本文整理汇总了C#中IMetadataProvider类的典型用法代码示例。如果您正苦于以下问题:C# IMetadataProvider类的具体用法?C# IMetadataProvider怎么用?C# IMetadataProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMetadataProvider类属于命名空间,在下文中一共展示了IMetadataProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ContextEntityTypesProvider
public ContextEntityTypesProvider(IMetadataProvider metadataProvider)
{
var testMetadata = metadataProvider.GetMetadataSet<TestCaseMetadataIdentity>().Metadata.Values.OfType<TestCaseMetadataElement>().ToArray();
var features = GetContextFeatures(testMetadata);
_entitiesByContext = features.GroupBy(x => x.Context, x => x.Data)
.ToDictionary(x => x.Key, x => x.SelectMany(y => y).Select(y => y.GetType()).Distinct().ToArray());
}
开发者ID:2gis,项目名称:nuclear-data-test,代码行数:7,代码来源:ContextEntityTypesProvider.cs
示例2: UpdateMetadataCommandTests
public UpdateMetadataCommandTests()
{
_metadataProvider = Substitute.For<IMetadataProvider>();
_progressManager = Substitute.For<IProgressManagerViewModel>();
_busyProvider = Substitute.For<IBusyProvider>();
_command = new UpdateMetadataCommand(_metadataProvider, _progressManager, _busyProvider);
}
开发者ID:hamstercat,项目名称:perfect-media,代码行数:7,代码来源:UpdateMetadataCommandTests.cs
示例3: GetRandomMetadata
SetRandomMetadata
(
IMetadataProvider oMetadataProvider,
Boolean bSetMetadataValues,
Boolean bSetTag,
Int32 iSeed
)
{
KeyValuePair<String, Object> [] aoRandomMetadata;
Object oRandomTag;
GetRandomMetadata(iSeed, out aoRandomMetadata, out oRandomTag);
if (bSetMetadataValues)
{
foreach (KeyValuePair<String, Object> oRandomMetadata
in aoRandomMetadata)
{
oMetadataProvider.SetValue(
oRandomMetadata.Key, oRandomMetadata.Value);
}
}
if (bSetTag)
{
oMetadataProvider.Tag = oRandomTag;
}
}
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:28,代码来源:MetadataUtil.cs
示例4: PdbWriter
public PdbWriter(string fileName, IMetadataProvider metadataProvider)
{
this.pdb = new ISymUnmanagedWriter2();
this.metadataProvider = metadataProvider;
this.documentWriters = new Dictionary<string, ISymUnmanagedDocumentWriter>();
this.pdb.Initialize(new Metadata(metadataProvider), fileName, pIStream: null, fFullBuild: true);
}
开发者ID:ArsenShnurkov,项目名称:SyntaxTree.Pdb,代码行数:8,代码来源:PdbWriter.cs
示例5: LoadSignature
/// <summary>
/// Loads the signature.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
public void LoadSignature(IMetadataProvider provider, TokenTypes token)
{
byte[] buffer;
int index = 0;
provider.Read(token, out buffer);
ParseSignature(buffer, ref index);
Debug.Assert(index == buffer.Length, @"Signature parser didn't complete.");
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:13,代码来源:Signature.cs
示例6: EdmModelBuilder
public EdmModelBuilder(IMetadataProvider metadataProvider)
{
if (metadataProvider == null)
{
throw new ArgumentNullException("metadataProvider");
}
_metadataProvider = metadataProvider;
}
开发者ID:denisivan0v,项目名称:nuclear-river,代码行数:8,代码来源:EdmModelBuilder.cs
示例7: BuildModel
private static IEdmModel BuildModel(IMetadataProvider provider, Uri contextId)
{
var builder = new EdmModelBuilder(provider);
var model = builder.Build(contextId);
model.Dump();
return model;
}
开发者ID:gitter-badger,项目名称:nuclear-river,代码行数:9,代码来源:EdmModelBuilderTests.cs
示例8: Signature
/// <summary>
/// Loads the signature.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
public Signature(IMetadataProvider provider, TokenTypes token)
{
SignatureReader reader = new SignatureReader(provider.ReadBlob(token));
this.ParseSignature(reader);
Debug.Assert(reader.Index == reader.Length, @"Signature parser didn't complete.");
this.token = token;
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:14,代码来源:Signature.cs
示例9: EventBus
public EventBus(IMessageSender messageSender,
IRoutingKeyProvider routingKeyProvider,
IMetadataProvider metadataProvider)
{
this.messageSender = messageSender;
this.routingKeyProvider = routingKeyProvider;
this.metadataProvider = metadataProvider;
this.logger = LogManager.GetLogger("ThinkNet");
}
开发者ID:y2ket,项目名称:thinknet,代码行数:9,代码来源:EventBus.cs
示例10: Parse
/// <summary>
/// Parses the specified provider.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
/// <returns></returns>
public static LocalVariableSignature Parse(IMetadataProvider provider, TokenTypes token)
{
byte[] buffer;
int index = 0;
provider.Read(token, out buffer);
LocalVariableSignature sig = new LocalVariableSignature();
sig.ParseSignature(buffer, ref index);
Debug.Assert(index == buffer.Length, @"Signature parser didn't complete.");
return sig;
}
开发者ID:hj1980,项目名称:Mosa,代码行数:16,代码来源:LocalVariableSignature.cs
示例11: OperationsPrimaryProcessingJob
public OperationsPrimaryProcessingJob(
IMetadataProvider metadataProvider,
IMessageFlowProcessorFactory messageFlowProcessorFactory,
ISignInService signInService,
IUserImpersonationService userImpersonationService,
ITracer tracer)
: base(signInService, userImpersonationService, tracer)
{
_metadataProvider = metadataProvider;
_messageFlowProcessorFactory = messageFlowProcessorFactory;
}
开发者ID:denisivan0v,项目名称:nuclear-river,代码行数:11,代码来源:OperationsPrimaryProcessingJob.cs
示例12: GenerationController
public GenerationController(DTE dte, IMetadataProvider metadataProvider, SolutionMonitor solutionMonitor, TemplateController templateController, EventQueue eventQueue)
{
this.dte = dte;
this.metadataProvider = metadataProvider;
this.templateController = templateController;
solutionMonitor.FileAdded += (sender, args) => eventQueue.Enqueue(Render, GenerationType.Render, args.Path);
solutionMonitor.FileChanged += (sender, args) => eventQueue.Enqueue(Render, GenerationType.Render, args.Path);
solutionMonitor.FileDeleted += (sender, args) => eventQueue.Enqueue(Render, GenerationType.Delete, args.Path);
solutionMonitor.FileRenamed += (sender, args) => eventQueue.Enqueue(Render, GenerationType.Rename, args.OldPath, args.NewPath);
}
开发者ID:Kymeric,项目名称:Typewriter,代码行数:11,代码来源:GenerationController.cs
示例13: CommandBus
public CommandBus(IMessageSender messageSender,
ICommandResultManager commandResultManager,
IRoutingKeyProvider routingKeyProvider,
IMetadataProvider metadataProvider)
{
this.messageSender = messageSender;
this.commandResultManager = commandResultManager;
this.routingKeyProvider = routingKeyProvider;
this.metadataProvider = metadataProvider;
this.logger = LogManager.GetLogger("ThinkNet");
}
开发者ID:y2ket,项目名称:thinknet,代码行数:11,代码来源:CommandBus.cs
示例14: LoadSignature
/// <summary>
/// Loads the signature.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
public void LoadSignature(ISignatureContext context, IMetadataProvider provider, TokenTypes token)
{
byte[] buffer;
provider.Read(token, out buffer);
int index = 0;
this.ParseSignature(context, buffer, ref index);
Debug.Assert(index == buffer.Length, @"Signature parser didn't complete.");
this.token = token;
}
开发者ID:hj1980,项目名称:MOSA-Project,代码行数:16,代码来源:Signature.cs
示例15: OperationsFinalProcessingJob
public OperationsFinalProcessingJob(
IMetadataProvider metadataProvider,
IMessageFlowProcessorFactory messageFlowProcessorFactory,
ISignInService signInService,
IUserImpersonationService userImpersonationService,
ITracer tracer)
: base(signInService, userImpersonationService, tracer)
{
_metadataProvider = metadataProvider;
_messageFlowProcessorFactory = messageFlowProcessorFactory;
_firstFaultTolerantStageSetting = new Lazy<MessageProcessingStage>(EvaluateFirstFaultTolerantStage);
}
开发者ID:denisivan0v,项目名称:nuclear-river,代码行数:12,代码来源:OperationsFinalProcessingJob.cs
示例16: FactsReplicator
public FactsReplicator(
ITracer tracer,
IReplicationSettings replicationSettings,
IMetadataProvider metadataProvider,
IFactProcessorFactory factProcessorFactory,
IComparer<Type> factTypePriorityComparer)
{
_tracer = tracer;
_replicationSettings = replicationSettings;
_metadataProvider = metadataProvider;
_factProcessorFactory = factProcessorFactory;
_factTypePriorityComparer = factTypePriorityComparer;
}
开发者ID:gitter-badger,项目名称:nuclear-river,代码行数:13,代码来源:FactsReplicator.cs
示例17: CreateHeap
/// <summary>
/// Creates an instance of a specific heap type.
/// </summary>
/// <param name="provider">The provider buffer, which contains the heap.</param>
/// <param name="type">The type of the heap to create.</param>
/// <param name="metadata">The metadata.</param>
/// <param name="offset">The offset into the buffer, where the heap starts.</param>
/// <param name="size">The size of the heap in bytes.</param>
/// <returns>An instance of the requested heap type.</returns>
/// <exception cref="System.ArgumentException">An invalid heap type was requested.</exception>
public static Heap CreateHeap(IMetadataProvider provider, HeapType type, byte[] metadata, int offset, int size)
{
switch (type)
{
case HeapType.String: return new StringHeap(metadata, offset, size);
case HeapType.Guid: return new GuidHeap(metadata, offset, size);
case HeapType.Blob: return new BlobHeap(metadata, offset, size);
case HeapType.UserString: return new UserStringHeap(metadata, offset, size);
case HeapType.Tables: return new TableHeap(provider, metadata, offset, size);
}
throw new ArgumentException(@"Invalid heap type.", @"type");
}
开发者ID:Zahovay,项目名称:MOSA-Project,代码行数:23,代码来源:Heap.cs
示例18: given_an_empty_event_log
public given_an_empty_event_log()
{
this.tableName = "AzureEventLogFixture" + new Random((int)DateTime.Now.Ticks).Next();
var settings = InfrastructureSettings.Read("Settings.xml").EventSourcing;
this.account = CloudStorageAccount.Parse(settings.ConnectionString);
this.eventA = new EventA();
this.eventB = new EventB();
this.eventC = new EventC();
this.metadata = Mock.Of<IMetadataProvider>(x =>
x.GetMetadata(eventA) == new Dictionary<string, string>
{
{ StandardMetadata.SourceId, eventA.SourceId.ToString() },
{ StandardMetadata.SourceType, "SourceA" },
{ StandardMetadata.Kind, StandardMetadata.EventKind },
{ StandardMetadata.AssemblyName, "A" },
{ StandardMetadata.Namespace, "Namespace" },
{ StandardMetadata.FullName, "Namespace.EventA" },
{ StandardMetadata.TypeName, "EventA" },
} &&
x.GetMetadata(eventB) == new Dictionary<string, string>
{
{ StandardMetadata.SourceId, eventB.SourceId.ToString() },
{ StandardMetadata.SourceType, "SourceB" },
{ StandardMetadata.Kind, StandardMetadata.EventKind },
{ StandardMetadata.AssemblyName, "B" },
{ StandardMetadata.Namespace, "Namespace" },
{ StandardMetadata.FullName, "Namespace.EventB" },
{ StandardMetadata.TypeName, "EventB" },
} &&
x.GetMetadata(eventC) == new Dictionary<string, string>
{
{ StandardMetadata.SourceId, eventC.SourceId.ToString() },
{ StandardMetadata.SourceType, "SourceC" },
{ StandardMetadata.Kind, StandardMetadata.EventKind },
{ StandardMetadata.AssemblyName, "B" },
{ StandardMetadata.Namespace, "AnotherNamespace" },
{ StandardMetadata.FullName, "AnotherNamespace.EventC" },
{ StandardMetadata.TypeName, "EventC" },
});
this.serializer = new JsonTextSerializer();
this.writer = new AzureMessageLogWriter(this.account, this.tableName);
this.sut = new AzureEventLogReader(this.account, this.tableName, new JsonTextSerializer());
this.startEnqueueTime = new DateTime(2012, 06, 30, 23, 59, 0, DateTimeKind.Utc);
Save(eventA, startEnqueueTime);
Save(eventB, startEnqueueTime.AddMinutes(5));
Save(eventC, startEnqueueTime.AddMinutes(6));
}
开发者ID:TiagoTerra,项目名称:cqrs-journey,代码行数:51,代码来源:AzureEventLogFixture.cs
示例19: CheckRandomMetadata
//*************************************************************************
// Method: CheckRandomMetadata()
//
/// <summary>
/// Checks the random metadata and Tag values on an object that implements
/// <see cref="IMetadataProvider" />.
/// </summary>
///
/// <param name="oMetadataProvider">
/// Object to check random metadata and Tag values on.
/// </param>
///
/// <param name="bRandomMetadataExpected">
/// true if the metadata was set with <see cref="SetRandomMetadata" />,
/// false if the metadata was left empty.
/// </param>
///
/// <param name="bRandomTagExpected">
/// true if the Tag was set with <see cref="SetRandomMetadata" />,
/// false if the Tag was left as null.
/// </param>
///
/// <param name="iSeed">
/// Seed to use for the random number generator.
/// </param>
///
/// <remarks>
/// This method checks the random metadata and Tag values that were set
/// with <see cref="SetRandomMetadata" />.
/// </remarks>
//*************************************************************************
public static void CheckRandomMetadata(
IMetadataProvider oMetadataProvider,
Boolean bRandomMetadataExpected,
Boolean bRandomTagExpected,
Int32 iSeed
)
{
KeyValuePair<String, Object> [] aoRandomMetadata;
Object oRandomTag;
GetRandomMetadata(iSeed, out aoRandomMetadata, out oRandomTag);
foreach (KeyValuePair<String, Object> oRandomMetadata
in aoRandomMetadata)
{
String sRandomKey = oRandomMetadata.Key;
Object oRandomValue = oRandomMetadata.Value;
if (bRandomMetadataExpected)
{
Assert.IsTrue( oMetadataProvider.ContainsKey(sRandomKey) );
Object oValue;
Assert.IsTrue( oMetadataProvider.TryGetValue(
sRandomKey,
(oRandomValue == null) ?
typeof(Object) : oRandomValue.GetType(),
out oValue
) );
CheckMetadataValue(oRandomValue, oValue);
}
else
{
Assert.IsFalse( oMetadataProvider.ContainsKey(sRandomKey) );
}
}
if (bRandomTagExpected)
{
CheckMetadataValue(oRandomTag, oMetadataProvider.Tag);
}
else
{
Assert.IsNull(oMetadataProvider.Tag);
}
}
开发者ID:haisreekanth,项目名称:NetMap,代码行数:82,代码来源:MetadataUtil.cs
示例20: CommonReplicationStrategy
public CommonReplicationStrategy(IMetadataProvider metadataProvider, Type entityType)
{
Guard.AgainstNull(metadataProvider, "metadataProvider");
Guard.AgainstNull(entityType, "entityType");
Guard.AgainstViolation(!entityType.IsNullable() && !entityType.IsArray,
"CommonReplicationStrategy is not applicable to nullable or array types");
this.entityType = entityType;
memberDescriptions = metadataProvider.GetFieldsReplicationInfo(entityType)
.Where(t => t.Behavior != ReplicationBehavior.Ignore)
.Select(t => new MemberReplicationInfo(entityType, t))
.ToArray();
}
开发者ID:saeedallahyari,项目名称:NClone,代码行数:14,代码来源:CommonReplicationStrategy.cs
注:本文中的IMetadataProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论