本文整理汇总了C#中IIndex类的典型用法代码示例。如果您正苦于以下问题:C# IIndex类的具体用法?C# IIndex怎么用?C# IIndex使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IIndex类属于命名空间,在下文中一共展示了IIndex类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: QueryDataSourceCommand
public QueryDataSourceCommand(
IDataTypeProvider dataTypeProvider,
IIndex<string, IQueryDataSourceCommandImplementation> repositories)
{
_dataTypeProvider = dataTypeProvider;
_repositories = repositories;
}
开发者ID:koav,项目名称:Rhetos,代码行数:7,代码来源:QueryDataSourceCommand.cs
示例2: ApplicationDatabase
public ApplicationDatabase(
IConnectionStringProvider connectionStringProvider,
IIndex<string, IDatabaseProvider> providerLookup)
{
this.connectionStringProvider = connectionStringProvider;
this.providerLookup = providerLookup;
}
开发者ID:nategreenwood,项目名称:nategreenwood.com,代码行数:7,代码来源:ApplicationDatabase.cs
示例3: IndexReader
public IndexReader(IIndex index, bool openReadOnly)
{
if (index == null)
throw new ArgumentNullException("index", "index cannot be null");
this.index = index;
this.isReadOnly = openReadOnly;
this.isDisposed = false;
switch (index.IndexStructure) {
case IndexType.SingleIndex:
var singleIndex = (IIndex)index;
if (!singleIndex.HasIndexFiles())
throw new InvalidOperationException("There are no index files in the specified directory " + index.IndexDirectory.FullName);
this.luceneDirectory = singleIndex.GetLuceneDirectory();
break;
case IndexType.DoubleIndex:
case IndexType.CyclicalIndex:
var doubleIndex = (DoubleIndex)index;
if (!doubleIndex.HasIndexFiles())
throw new InvalidOperationException("There are no index files in the specified directory " + index.IndexDirectory.FullName);
this.luceneDirectory = doubleIndex.GetLuceneDirectory();
break;
default:
throw new NotSupportedException(index.IndexStructure.ToString() + " not supported");
}
this.luceneReader = Lucene29.Net.Index.IndexReader.Open(this.luceneDirectory, openReadOnly);
}
开发者ID:DigenGada,项目名称:lucene-dotnet-api,代码行数:27,代码来源:IndexReader.cs
示例4: GetMessage
private static string GetMessage(
IIndex primaryIndex,
IIndex foreignIndex,
object primaryKey)
{
string foreignTable =
foreignIndex.Table.EntityType.Name;
string foreignColumns =
string.Join(", ", foreignIndex.KeyInfo.EntityKeyMembers.Select(m => m.Name));
string primaryTable =
primaryIndex.Table.EntityType.Name;
string primaryColumns =
string.Join(", ", primaryIndex.KeyInfo.EntityKeyMembers.Select(m => m.Name));
return string.Format(
ExceptionMessages.ForeignKeyViolation,
foreignTable,
foreignColumns,
primaryKey,
primaryTable,
primaryColumns);
}
开发者ID:RageRabbit,项目名称:nmemory,代码行数:25,代码来源:ForeignKeyViolationException.cs
示例5: Core
public Core(IIndex index)
{
if (index == null)
throw new ArgumentNullException("index");
_index = index;
}
开发者ID:MartinF,项目名称:Dynamo.Jiss,代码行数:7,代码来源:Core.cs
示例6: CreateIndexCommand
public CreateIndexCommand(
IIndex index,
IEnumerable<int> addedDocumentIds,
string tablePrefix) : base(index, tablePrefix)
{
_addedDocumentIds = addedDocumentIds;
}
开发者ID:sebastienros,项目名称:yessql,代码行数:7,代码来源:CreateIndexCommand.cs
示例7: DbAccessProvider
/// <summary>
/// Initializes a new instance of the <see cref="DbAccessProvider" /> class.
/// </summary>
/// <param name="dbAccessProviders">
/// The db access providers.
/// </param>
/// <param name="serviceLocator">
/// The service locator.
/// </param>
public DbAccessProvider(IIndex<string, IDbAccess> dbAccessProviders, IServiceLocator serviceLocator)
{
this._dbAccessProviders = dbAccessProviders;
this._serviceLocator = serviceLocator;
this._providerName = Config.ConnectionProviderName;
this._dbAccessSafe = new SafeReadWriteProvider<IDbAccess>(
() =>
{
IDbAccess dbAccess;
// attempt to get the provider...
if (this._dbAccessProviders.TryGetValue(this.ProviderName, out dbAccess))
{
// first time...
this._serviceLocator.Get<IRaiseEvent>().Raise(new InitDatabaseProviderEvent(this.ProviderName, dbAccess));
}
else
{
throw new NoValidDbAccessProviderFoundException(
@"Unable to Locate Provider Named ""{0}"" in Data Access Providers (DLL Not Located in Bin Directory?).".FormatWith(
this.ProviderName));
}
return dbAccess;
});
}
开发者ID:RH-Code,项目名称:YAFNET,代码行数:36,代码来源:DbAccessProvider.cs
示例8: Import
public void Import(IIndex index, int count)
{
var reader = new DataDumpReader<Post>();
var xml = Path.Combine(path, "posts.xml");
index.Add(reader.Read(xml)
.Where(p => p.PostTypeId == PostTypeId.Question)
.Take(count));
}
开发者ID:billings-dot-net-users-group,项目名称:search-demo,代码行数:8,代码来源:StackExchangeImporter.cs
示例9: ForeignKeyViolationException
public ForeignKeyViolationException(
IIndex primaryIndex,
IIndex foreignIndex,
object primaryKey)
: base(ErrorCode.RelationError,
GetMessage(primaryIndex, foreignIndex, primaryKey))
{
}
开发者ID:RageRabbit,项目名称:nmemory,代码行数:8,代码来源:ForeignKeyViolationException.cs
示例10: MapState
public MapState(IIndex map, MapStates state)
{
Map = map;
State = state;
RemovedDocuments = new List<Document>();
AddedDocuments = new List<Document>();
}
开发者ID:SmartFire,项目名称:yessql,代码行数:8,代码来源:MapState.cs
示例11: InitGroups
public void InitGroups(QueryProcessor processor, IIndex<long> emptyIndexContainer)
{
Debug.Assert(emptyIndexContainer.Count == 0);
ITable child = BaseTable;
// No groups, so make the entire child table the group,
if (aggregateComposite == null || child.RowCount <= 1) {
emptyIndexContainer.Add(0);
emptyIndexContainer.Add(child.RowCount);
}
// Populate the index by the aggregate composite,
else {
// Create a resolver for the composite function
IndexResolver resolver = processor.CreateResolver(child, aggregateComposite);
// The groups state
long groupPos = 0;
long groupSize = 0;
SqlObject[] lastComposite = null;
// Scan over the child
IRowCursor cursor = child.GetRowCursor();
while (cursor.MoveNext()) {
RowId rowid = cursor.Current;
// Get the group term
SqlObject[] groupValue = resolver.GetValue(rowid);
if (lastComposite == null) {
lastComposite = groupValue;
} else {
int c = SqlObject.Compare(groupValue, lastComposite);
// If group_val > the last composite, we are on a new group
if (c > 0) {
// New group,
emptyIndexContainer.Add(groupPos);
emptyIndexContainer.Add(groupSize);
lastComposite = groupValue;
groupPos = groupPos + groupSize;
groupSize = 0;
} else if (c < 0) {
// This will happen if the child table is not sorted by the
// composite expression.
throw new ApplicationException("Aggregate child is not sorted correctly.");
}
}
++groupSize;
}
// Final group
// (the below check probably not necessary since we already check for the
// empty child so group size will always be >1 at this point).
if (groupSize > 0) {
emptyIndexContainer.Add(groupPos);
emptyIndexContainer.Add(groupSize);
}
}
// Set the group index
childGroupsIndex = emptyIndexContainer;
lookupCursor = BaseTable.GetRowCursor();
}
开发者ID:ikvm,项目名称:deveelsql,代码行数:57,代码来源:AggregateTable.cs
示例12: For
public override IEnumerable<IAnnotation> For(IIndex index)
{
if (index.MyCat().Method != null)
{
yield return new Annotation(
MyCatAnnotationNames.Prefix + MyCatAnnotationNames.IndexMethod,
index.MyCat().Method);
}
}
开发者ID:yonglehou,项目名称:Pomelo.EntityFrameworkCore.MyCat,代码行数:9,代码来源:MyCatMigrationsAnnotationProvider.cs
示例13: Output_index
public static void Output_index(IIndex index)
{
foreach (var e in index.Entries)
{
System.Console.WriteLine("{0}", e.Word);
foreach (var dn in e.DocumentNames)
System.Console.WriteLine("\t{0}", dn);
}
}
开发者ID:ralfw,项目名称:WordIndex-ArchitectureComparison,代码行数:9,代码来源:Console.cs
示例14: AttachToModel
public void AttachToModel(IIndex index)
{
if (!Detached) DetachFromModel();
Index = index;
index.PropertyChanged += Index_PropertyChanged;
Detached = false;
SetupForm();
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:9,代码来源:IndexPresenter.cs
示例15: Dump_index
private void Dump_index(IIndex index)
{
foreach(var e in index.Entries)
{
System.Console.WriteLine("{0}", e.Word);
foreach(var dn in e.DocumentNames)
System.Console.WriteLine("\t{0}", dn);
}
}
开发者ID:ralfw,项目名称:WordIndex-ArchitectureComparison,代码行数:9,代码来源:Console.cs
示例16: For
public override IEnumerable<IAnnotation> For(IIndex index)
{
if (index.SqlServer().IsClustered.HasValue)
{
yield return new Annotation(
SqlServerAnnotationNames.Prefix + SqlServerAnnotationNames.Clustered,
index.SqlServer().IsClustered.Value);
}
}
开发者ID:adwardliu,项目名称:EntityFramework,代码行数:9,代码来源:SqlServerMigrationsAnnotationProvider.cs
示例17: For
/// <summary>
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
public override IEnumerable<IAnnotation> For(IIndex index)
{
var isClustered = index.SqlServer().IsClustered;
if (isClustered.HasValue)
{
yield return new Annotation(
SqlServerFullAnnotationNames.Instance.Clustered,
isClustered.Value);
}
}
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:14,代码来源:SqlServerMigrationsAnnotationProvider.cs
示例18: Core
public Core(IIndex index, IFeedbackManager feedback)
{
if (index == null)
throw new ArgumentNullException("index");
if (feedback == null)
throw new ArgumentNullException("feedback");
_index = index;
Feedback = feedback;
}
开发者ID:MartinF,项目名称:Dynamo.AutoTT,代码行数:10,代码来源:Core.cs
示例19: DatabaseUpgradeDetector
public DatabaseUpgradeDetector(
IConnectionStringProvider connectionStringProvider,
IEnumerable<ScriptedExtension> extensions,
IApplicationDatabase database,
IIndex<string, IDatabaseProvider> currentProviderLookup)
{
this.connectionStringProvider = connectionStringProvider;
this.extensions = extensions;
this.database = database;
this.currentProviderLookup = currentProviderLookup;
}
开发者ID:nategreenwood,项目名称:nategreenwood.com,代码行数:11,代码来源:DatabaseUpgradeDetector.cs
示例20: SetUp
public void SetUp()
{
connectionString = Substitute.For<IConnectionStringProvider>();
connectionString.Schema = "dbo";
connectionString.DatabaseProvider = "sql";
applicationDatabase = Substitute.For<IApplicationDatabase>();
databaseProviderLookup = Substitute.For<IIndex<string, IDatabaseProvider>>();
databaseProvider = Substitute.For<IDatabaseProvider>();
databaseProviderLookup[Arg.Any<string>()].Returns(databaseProvider);
detector = new DatabaseUpgradeDetector(connectionString, extensions, applicationDatabase, databaseProviderLookup);
}
开发者ID:slavo,项目名称:FunnelWeb,代码行数:11,代码来源:DatabaseUpgradeDetectorTests.cs
注:本文中的IIndex类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论