当前位置: 首页>>代码示例>>C#>>正文


C# IndexType类代码示例

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


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


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