• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IndexType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IndexType的典型用法代码示例。如果您正苦于以下问题:C# IndexType类的具体用法?C# IndexType怎么用?C# IndexType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IndexType类属于命名空间,在下文中一共展示了IndexType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: IndexDefinition

        public IndexDefinition(IndexType indexType,
                               IList<IndexColumnName> columns,
                               IList<IndexOption> options)
        {
            IndexType = indexType;
            if (columns == null || columns.IsEmpty())
            {
                throw new ArgumentException("columns is null or empty");
            }

            Columns = columns;
            Options = options == null || options.IsEmpty() ? new List<IndexOption>(0) : options;
        }
开发者ID:tupunco,项目名称:Tup.Cobar4Net,代码行数:13,代码来源:IndexDefinition.cs


示例2: HardwareIndexBuffer

	    /// <summary>
	    ///		Constructor.
	    /// </summary>
	    ///<param name="manager"></param>
	    ///<param name="type">Type of index (16 or 32 bit).</param>
	    /// <param name="numIndices">Number of indices to create in this buffer.</param>
	    /// <param name="usage">Buffer usage.</param>
	    /// <param name="useSystemMemory">Create in system memory?</param>
	    /// <param name="useShadowBuffer">Use a shadow buffer for reading/writing?</param>
	    public HardwareIndexBuffer( HardwareBufferManagerBase manager, IndexType type, int numIndices, BufferUsage usage, bool useSystemMemory, bool useShadowBuffer )
			: base( usage, useSystemMemory, useShadowBuffer )
		{
			this.type = type;
			this.numIndices = numIndices;
			this.Manager =  manager;
			// calc the index buffer size
			sizeInBytes = numIndices;

			if ( type == IndexType.Size32 )
			{
				indexSize = Marshal.SizeOf( typeof( int ) );
			}
			else
			{
				indexSize = Marshal.SizeOf( typeof( short ) );
			}

			sizeInBytes *= indexSize;

			// create a shadow buffer if required
			if ( useShadowBuffer )
			{
				shadowBuffer = new DefaultHardwareIndexBuffer( Manager, type, numIndices, BufferUsage.Dynamic );
			}
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:35,代码来源:HardwareIndexBuffer.cs


示例3: ShouldCreateIndex

        public void ShouldCreateIndex(
            IndexFor indexFor,
            IndexProvider indexProvider,
            IndexType indexType,
            string createEndpoint,
            string createJson)
        {
            //Arrange
            using (var testHarness = new RestTestHarness
            {
                {
                    MockRequest.PostJson(createEndpoint, createJson),
                    MockResponse.Http(201)
                }
            })
            {
                var graphClient = testHarness.CreateAndConnectGraphClient();

                var indexConfiguration = new IndexConfiguration
                {
                    Provider = indexProvider,
                    Type = indexType
                };
                graphClient.CreateIndex("foo", indexConfiguration, indexFor);
            }
        }
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:26,代码来源:CreateIndexTests.cs


示例4: IndexOption

 public IndexOption(IndexType indexType)
 {
     KeyBlockSize = null;
     IndexType = indexType;
     ParserName = null;
     Comment = null;
 }
开发者ID:tupunco,项目名称:Tup.Cobar4Net,代码行数:7,代码来源:IndexOption.cs


示例5: GLESHardwareIndexBuffer

		public GLESHardwareIndexBuffer( HardwareBufferManagerBase manager, IndexType type, int numIndices, BufferUsage usage, bool useShadowBuffer )
			: base( manager, type, numIndices, usage, false, useShadowBuffer )
		{
			if ( type == IndexType.Size32 )
			{
				throw new AxiomException( "32 bit hardware buffers are not allowed in OpenGL ES." );
			}
			
			if ( !useShadowBuffer )
			{
				throw new AxiomException( "Only support with shadowBuffer" );
			}
			
			OpenGL.GenBuffers( 1, ref this._bufferId );
			GLESConfig.GlCheckError( this );
			if ( this._bufferId == 0 )
			{
				throw new AxiomException( "Cannot create GL index buffer" );
			}
			
			OpenGL.BindBuffer( All.ElementArrayBuffer, this._bufferId );
			GLESConfig.GlCheckError( this );
			OpenGL.BufferData( All.ElementArrayBuffer, new IntPtr( sizeInBytes ), IntPtr.Zero, GLESHardwareBufferManager.GetGLUsage( usage ) );
			GLESConfig.GlCheckError( this );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:25,代码来源:GLESHardwareIndexBuffer.cs


示例6: SearcherEventArgs

 /// <summary>
 /// Initializes a new instance of the <see cref="SearcherEventArgs"/> class.
 /// </summary>
 /// <param name="indexName">Name of the index that is being searched.</param>
 /// <param name="structure">The structure of the index that is being searched.</param>
 /// <param name="methodType">The search method type that is being used.</param>
 /// <param name="location">The location within the method body where this event was fired from.</param>
 /// <param name="result">The search result was found.</param>
 public SearcherEventArgs(string indexName, IndexType structure, SearchMethodType methodType, SearchMethodLocation location, SearchResult result)
 {
     this.indexName = indexName;
     this.structure = structure;
     this.SearchMethodType = methodType;
     this.SearchMethodLocation = location;
     this.SearchResult = result;
 }
开发者ID:DigenGada,项目名称:lucene-dotnet-api,代码行数:16,代码来源:SearcherEventArgs.cs


示例7: CreateIndexBuffer

		public override HardwareIndexBuffer CreateIndexBuffer( IndexType type, int numIndices, BufferUsage usage,
															   bool useShadowBuffer )
		{
			var buffer = new GLHardwareIndexBuffer( this, type, numIndices, usage, useShadowBuffer );
			lock ( IndexBuffersMutex )
				indexBuffers.Add( buffer );
			return buffer;
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:8,代码来源:GLHardwareBufferManager.cs


示例8: ValidityIndex

 public ValidityIndex(IndexType indexType)
 {
     IndexType = indexType;
     m_PreviousValue = 0;
     CurrentValue = 0;
     m_IsRising = true;
     m_LocalMaximums = new List<double>();
 }
开发者ID:osnihur,项目名称:clustering,代码行数:8,代码来源:ValidityIndex.cs


示例9: DeleteIndexRequest

        public DeleteIndexRequest(string designDoc, string name, IndexType type = IndexType.Json)
        {
            Ensure.That(designDoc, "designDoc").IsNotNullOrWhiteSpace();
            Ensure.That(name, "name").IsNotNullOrWhiteSpace();

            DesignDoc = designDoc;
            Name = name;
            Type = type;
        }
开发者ID:aldass,项目名称:mycouch,代码行数:9,代码来源:DeleteIndexRequest.cs


示例10: CreateIndexBuffer

		public override HardwareIndexBuffer CreateIndexBuffer( IndexType type, int numIndices, BufferUsage usage, bool useShadowBuffer )
		{
			var indexBuffer = new GLESHardwareIndexBuffer( this, type, numIndices, usage, true );
			lock ( IndexBuffersMutex )
			{
				indexBuffers.Add( indexBuffer );
			}
			return indexBuffer;
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:9,代码来源:GLES2HardwareBufferManagerBase.cs


示例11: Index

 public Index(DirectoryInfo indexDirectory)
 {
     if (indexDirectory == null)
         throw new ArgumentNullException("indexDirectory", "indexDirectory cannot be null");
     if (!indexDirectory.Exists)
         indexDirectory.Create();
     this.directory = indexDirectory;
     this.structure = IndexLibrary.IndexType.SingleIndex;
 }
开发者ID:DigenGada,项目名称:lucene-dotnet-api,代码行数:9,代码来源:SingleIndex.cs


示例12: Validate

        private static IndexType Validate(IndexType type)
        {
#if SILVERLIGHT
            if (type != IndexType.Size16)
                LogManager.Instance.Write("WARNING!!! Requested 32 bit indexes but Reach profile on only allows 16 bit indexes");
            return IndexType.Size16;
#else
            return type;
#endif
        }
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:10,代码来源:XnaHardwareIndexBuffer.cs


示例13: createIndex

        public void createIndex(String indexName, String binName, IndexType indexType)
        {
            // drop index
            client.DropIndex(null, TestQueryEngine.NAMESPACE, SET, indexName);

                Thread.Sleep(150);

            // create index
            IndexTask task = client.CreateIndex(null, TestQueryEngine.NAMESPACE, SET, indexName, binName, indexType, IndexCollectionType.LIST);
            task.Wait();
        }
开发者ID:helipilot50,项目名称:aerospike-helper,代码行数:11,代码来源:ListTests.cs


示例14: GLES2DefaultHardwareIndexBuffer

		/// <summary>
		/// </summary>
		/// <param name="idxType"> </param>
		/// <param name="numIndexes"> </param>
		/// <param name="usage"> </param>
		public GLES2DefaultHardwareIndexBuffer( IndexType idxType, int numIndexes, BufferUsage usage )
			: base( null, idxType, numIndexes, usage, true, false ) // always software, never shadowed
		{
			if ( idxType == IndexType.Size32 )
			{
				throw new AxiomException( "32 bit hardware buffers are not allowed in OpenGL ES." );
			}

			this._data = new byte[ sizeInBytes ];
			this._dataPtr = BufferBase.Wrap( this._data );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:16,代码来源:GLES2DefaultHardwareIndexBuffer.cs


示例15: SqlCreateIndexExpression

 public SqlCreateIndexExpression(string indexName, SqlTableExpression table, bool unique, bool lowercaseIndex, IndexType indexType, bool ifNotExist, IReadOnlyList<SqlIndexedColumnExpression> columns)
     : base(typeof(void))
 {
     this.IndexName = indexName;
     this.Table = table;
     this.Unique = unique;
     this.LowercaseIndex = lowercaseIndex;
     this.IndexType = indexType;
     this.IfNotExist = ifNotExist;
     this.Columns = columns;
 }
开发者ID:ciker,项目名称:Shaolinq,代码行数:11,代码来源:SqlCreateIndexExpression.cs


示例16: GetInRange

 public IList<Record> GetInRange(IndexType type, DateTimeIntervals intervalType, IndexBarInfo barInfo, int startIndex, int count)
 {
     switch (type)
     {
         case IndexType.None:
             break;
         case IndexType.OEE:
             switch (barInfo.Level)
             {
                 case 0:
                     return GetOEEByDateTime(intervalType, startIndex, count);
                 case 1:
                     return GetOEEByMachines(barInfo, startIndex, count);
             }
             break;
         case IndexType.Performance:
             if (barInfo.Level == 0)
             {
                 return GetPerformanceByDateTime(intervalType, startIndex, count);
             }
             switch (barInfo.Filter)
             {
                 case IndexFilter.ByProduct:
                     return GetPerformanceByProducts(barInfo, startIndex, count);
                 case IndexFilter.ByStation:
                     return GetPerformanceByStations(barInfo, startIndex, count);
                 case IndexFilter.ByActivity:
                     return GetPerformanceByActivities(barInfo, startIndex, count);
                 case IndexFilter.ByOperator:
                     return GetPerformanceByOperators(barInfo, startIndex, count);
                 default:
                     return new List<Record>();
             }
         case IndexType.InternalPPM:
             switch (barInfo.Level)
             {
                 case 0:
                     return GetPPMByDateTime(intervalType, startIndex, count);
             }
             break;
         case IndexType.RemainingCapacity:
             switch (barInfo.Level)
             {
                 case 0:
                     return GetCapacityByDateTime(intervalType, startIndex, count);
             }
             break;
         default:
             throw new ArgumentOutOfRangeException("type");
     }
     return new List<Record>();
 }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:52,代码来源:IndexDataService.cs


示例17: IndexTool

        public IndexTool(UserSettings settings, string filename, IndexType indexType)
            : base()
        {
            try
            {
                this.settings = settings;
                this.filename = filename;
                this.indexType = indexType;

                if (indexType == IndexType.ffmsindex)
                {
                    if (settings.deleteIndex || isOlder(filename + ".ffindex", filename))
                    {
                        if (File.Exists(filename + ".ffindex"))
                        {
                            try
                            {
                                File.Delete(filename + ".ffindex");
                            }
                            catch (Exception)
                            {
                            }
                        }
                    }
                    Path = settings.ffmsindexPath;
                    Parameter = "\"" + filename + "\"";
                }
                else if (indexType == IndexType.dgindex)
                {
                    string output = System.IO.Path.ChangeExtension(filename, "dgi");
                    if (settings.deleteIndex || isOlder(output, filename))
                    {
                        if (File.Exists(output))
                        {
                            try
                            {
                                File.Delete(output);
                            }
                            catch (Exception)
                            {
                            }
                        }
                    }                    
                    Path = settings.dgindexnvPath;
                    Parameter = "-i \"" + filename + "\" -o \"" + output + "\" -e";
                }
            }
            catch (Exception)
            {
            }
        }
开发者ID:dbremner,项目名称:blurip,代码行数:51,代码来源:IndexTool.cs


示例18: RunWorkPlan

 public RunWorkPlan(
     DataSet dataSet,
     Cardinality cardinality,
     IndexType indexType,
     ReservationBufferSize reservationBufferSize,
     CacheSize cacheSize,
     Drive drive,
     CacheType cacheType,
     WorkPlan workPlan)
     : base(dataSet, cardinality, indexType, reservationBufferSize, cacheType, cacheSize)
 {
     Drive = drive;
     WorkPlan = workPlan;
 }
开发者ID:joaofig,项目名称:r-tree-csharp-framework,代码行数:14,代码来源:RunWorkPlan.cs


示例19: Experiment

 public Experiment(
     DataSet dataSet,
     Cardinality cardinality,
     IndexType indexType,
     ReservationBufferSize reservationBufferSize,
     CacheType cacheType,
     CacheSize cacheSize)
 {
     DataSet = dataSet;
     Cardinality = cardinality;
     IndexType = indexType;
     ReservationBufferSize = reservationBufferSize;
     CacheType = cacheType;
     CacheSize = cacheSize;
 }
开发者ID:joaofig,项目名称:r-tree-csharp-framework,代码行数:15,代码来源:Experiment.cs


示例20: XnaHardwareIndexBuffer

		unsafe public XnaHardwareIndexBuffer( HardwareBufferManagerBase manager, IndexType type, int numIndices, BufferUsage usage, XFG.GraphicsDevice device, bool useSystemMemory, bool useShadowBuffer )
			: base( manager, type, numIndices, usage, useSystemMemory, useShadowBuffer )
		{
			_bufferType = ( type == IndexType.Size16 ) ? XFG.IndexElementSize.SixteenBits : XFG.IndexElementSize.ThirtyTwoBits;

			// create the buffer
            if (usage == BufferUsage.Dynamic || usage == BufferUsage.DynamicWriteOnly)
            {
                _xnaBuffer = new XFG.IndexBuffer(device, _bufferType, numIndices, XnaHelper.Convert(usage));
            }
            else 
                _xnaBuffer = new XFG.IndexBuffer(device, _bufferType, numIndices, XFG.BufferUsage.None);

			_bufferBytes = new byte[ sizeInBytes ];
			_bufferBytes.Initialize();
		}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:16,代码来源:XnaHardwareIndexBuffer.cs



注:本文中的IndexType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IndexViewModel类代码示例发布时间:2022-05-24
下一篇:
C# IndexSearcher类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap