本文整理汇总了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;
}
示例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 );
}
}
示例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);
}
}
示例4: IndexOption
public IndexOption(IndexType indexType)
{
KeyBlockSize = null;
IndexType = indexType;
ParserName = null;
Comment = null;
}
示例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 );
}
示例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;
}
示例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;
}
示例8: ValidityIndex
public ValidityIndex(IndexType indexType)
{
IndexType = indexType;
m_PreviousValue = 0;
CurrentValue = 0;
m_IsRising = true;
m_LocalMaximums = new List<double>();
}
示例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;
}
示例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;
}
示例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;
}
示例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
}
示例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();
}
示例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 );
}
示例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;
}