本文整理汇总了C#中QualifiedName类的典型用法代码示例。如果您正苦于以下问题:C# QualifiedName类的具体用法?C# QualifiedName怎么用?C# QualifiedName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QualifiedName类属于命名空间,在下文中一共展示了QualifiedName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetType
public INamedTypeSymbol GetType(QualifiedName name)
{
// std // TODO: table of types in PchpCor
if (name == NameUtils.SpecialNames.stdClass)
{
return _compilation.PhpCorLibrary.GetTypeByMetadataName(name.ClrName());
}
// TODO: reserved type names: self, parent, static
Debug.Assert(!name.IsReservedClassName);
// library types
foreach (AssemblySymbol ass in _compilation.ProbingAssemblies)
{
if (!ass.IsPchpCorLibrary)
{
var candidate = ass.GetTypeByMetadataName(name.ClrName());
if (candidate != null && !candidate.IsErrorType())
{
if (ass is PEAssemblySymbol && ((PEAssemblySymbol)ass).IsExtensionLibrary && candidate.IsStatic)
{
continue;
}
return candidate;
}
}
}
//
return Next.GetType(name);
}
开发者ID:iolevel,项目名称:peachpie,代码行数:32,代码来源:GlobalSemantics.cs
示例2: AddUnknownFunctionCall
public static void AddUnknownFunctionCall(QualifiedName name)
{
var info = StaticInfo.Get;
if (info.UnknownCalls == null) info.UnknownCalls = new Dictionary<QualifiedName, int>();
CollectionUtils.IncrementValue(info.UnknownCalls, name, 1);
}
开发者ID:kendallb,项目名称:Phalanger,代码行数:7,代码来源:Statistics.cs
示例3: DataChangeMonitoredItem
/// <summary>
/// Constructs a new instance.
/// </summary>
public DataChangeMonitoredItem(
MonitoredNode source,
uint id,
uint attributeId,
NumericRange indexRange,
QualifiedName dataEncoding,
DiagnosticsMasks diagnosticsMasks,
TimestampsToReturn timestampsToReturn,
MonitoringMode monitoringMode,
uint clientHandle,
double samplingInterval,
bool alwaysReportUpdates)
{
m_source = source;
m_id = id;
m_attributeId = attributeId;
m_indexRange = indexRange;
m_dataEncoding = dataEncoding;
m_timestampsToReturn = timestampsToReturn;
m_diagnosticsMasks = diagnosticsMasks;
m_monitoringMode = monitoringMode;
m_clientHandle = clientHandle;
m_samplingInterval = samplingInterval;
m_nextSampleTime = DateTime.UtcNow.Ticks;
m_readyToPublish = false;
m_readyToTrigger = false;
m_alwaysReportUpdates = alwaysReportUpdates;
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:31,代码来源:DataChangeMonitoredItem.cs
示例4: DirectFcnCall
public DirectFcnCall(Text.Span span,
QualifiedName qualifiedName, QualifiedName? fallbackQualifiedName, Text.Span qualifiedNameSpan,
List<ActualParam>/*!*/ parameters, List<TypeRef>/*!*/ genericParams)
: base(span, qualifiedNameSpan, parameters, genericParams)
{
this.qualifiedName = qualifiedName;
this.fallbackQualifiedName = fallbackQualifiedName;
}
开发者ID:kaviarasankk,项目名称:Phalanger,代码行数:8,代码来源:FunctionCall.cs
示例5: DirectFcnCall
public DirectFcnCall(Position position,
QualifiedName qualifiedName, QualifiedName? fallbackQualifiedName, Position qualifiedNamePosition,
List<ActualParam>/*!*/ parameters, List<TypeRef>/*!*/ genericParams)
: base(position, qualifiedNamePosition, parameters, genericParams)
{
this.qualifiedName = qualifiedName;
this.fallbackQualifiedName = fallbackQualifiedName;
}
开发者ID:kripper,项目名称:Phalanger,代码行数:8,代码来源:FunctionCall.cs
示例6: QualifiedNameTestMethod1
public void QualifiedNameTestMethod1()
{
string name = "Default Binary";
QualifiedName _qn = new QualifiedName("Default Binary");
Assert.IsNotNull(_qn);
//Assert.AreEqual<int>(_qn.NamespaceIndex, 0);
Assert.IsFalse(_qn.NamespaceIndexSpecified);
Assert.AreEqual<string>(_qn.Name, name);
}
开发者ID:yuriik83,项目名称:OPC-UA-OOI,代码行数:9,代码来源:QualifiedNameUnitTest.cs
示例7: Function
/// <summary>Creates functions or procedure</summary>
public Function(QualifiedName name, IList<ParameterDescription> inputs, IList<ParameterDescription> outputs, IList<ParameterDescription> inouts, ParameterDescription returning, AccessModifier visibility = AccessModifier.Private)
{
QualifiedName = name;
Profile = new ParametersProfile();
Profile.InputParameters = inputs ?? new List<ParameterDescription>();
Profile.OutputParameters = outputs ?? new List<ParameterDescription>();
Profile.InoutParameters = inouts ?? new List<ParameterDescription>();
Profile.ReturningParameter = returning;
Visibility = visibility;
}
开发者ID:laurentprudhon,项目名称:TypeCobol,代码行数:11,代码来源:Function.cs
示例8: CreateNamespaceImport
private NamespaceImportDeclaration CreateNamespaceImport() {
NameDeclaration dummyName = new NameDeclaration(Dummy.Name, SourceDummy.SourceLocation);
SimpleName microsoft = new SimpleName(this.Compilation.NameTable.GetNameFor("Microsoft"), SourceDummy.SourceLocation, false);
SimpleName smallBasic = new SimpleName(this.Compilation.NameTable.GetNameFor("SmallBasic"), SourceDummy.SourceLocation, false);
SimpleName library = new SimpleName(this.Compilation.NameTable.GetNameFor("Library"), SourceDummy.SourceLocation, false);
QualifiedName microsoftSmallBasic = new QualifiedName(microsoft, smallBasic, SourceDummy.SourceLocation);
QualifiedName microsoftSmallBasicLibrary = new QualifiedName(microsoftSmallBasic, library, SourceDummy.SourceLocation);
NamespaceReferenceExpression smallBasicLibrary = new NamespaceReferenceExpression(microsoftSmallBasicLibrary, SourceDummy.SourceLocation);
return new NamespaceImportDeclaration(dummyName, smallBasicLibrary, SourceDummy.SourceLocation);
}
开发者ID:mestriga,项目名称:Microsoft.CciSamples,代码行数:10,代码来源:NamespaceDeclarations.cs
示例9: GetUniqueName
private static QualifiedName GetUniqueName(CodeTypeMember member, QualifiedName parentName)
{
if (member is CodeTypeDeclaration)
{
return new QualifiedName(GetUniqueName((CodeTypeDeclaration)member), null);
}
else
{
return new QualifiedName(GetUniqueName(member), parentName);
}
}
开发者ID:anukat2015,项目名称:sones,代码行数:11,代码来源:CodeDomUtils.cs
示例10: ReflectedProviderFactoryDefinitionBase
protected ReflectedProviderFactoryDefinitionBase(MethodBase method,
QualifiedName qname,
Type outputType)
{
this.qname = qname;
this.outputType = outputType;
this.method = method;
this.parameters = new PropertyDefinitionCollection();
parameters.AddRange(this, qname.NamespaceName, method.GetParameters(), method.IsExtension());
}
开发者ID:Carbonfrost,项目名称:ff-property-trees,代码行数:11,代码来源:ReflectedProviderFactoryDefinitionBase.cs
示例11: Construct
/// <summary>
/// Creates a new instance of the node.
/// </summary>
public static MethodSource Construct(
IServerInternal server,
NodeSource parent,
NodeId referenceTypeId,
NodeId nodeId,
QualifiedName browseName,
uint numericId)
{
MethodSource instance = new MethodSource(server, parent);
instance.Initialize(referenceTypeId, nodeId, browseName, numericId, null);
return instance;
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:15,代码来源:MethodSource.cs
示例12: Construct
/// <summary>
/// Creates a new instance of the node.
/// </summary>
public static ObjectSource Construct(
IServerInternal server,
NodeSource parent,
NodeId referenceTypeId,
NodeId nodeId,
QualifiedName browseName,
uint numericId)
{
ObjectSource instance = new ObjectSource(server, parent);
instance.Initialize(referenceTypeId, nodeId, browseName, numericId, ObjectTypes.BaseObjectType);
return instance;
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:15,代码来源:ObjectSource.cs
示例13: FixtureInit
public override void FixtureInit()
{
// Note element path.
noteElementPath = new XmlElementPath();
QualifiedName noteQualifiedName = new QualifiedName("note", "http://www.w3schools.com");
noteElementPath.Elements.Add(noteQualifiedName);
// Text element path.
textElementPath = new XmlElementPath();
textElementPath.Elements.Add(noteQualifiedName);
textElementPath.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:TwoElementSchemaTestFixture.cs
示例14: EnumerareCodeMembers
private static void EnumerareCodeMembers(CodeTypeMember member, QualifiedName parentName, Dictionary<string, CodeTypeMember> members)
{
QualifiedName memberName = GetUniqueName(member, parentName);
members[memberName.ToString()] = member;
CodeTypeDeclaration decl = member as CodeTypeDeclaration;
if (decl != null)
{
foreach (CodeTypeMember subMember in decl.Members)
{
EnumerareCodeMembers(subMember, memberName, members);
}
}
}
开发者ID:anukat2015,项目名称:sones,代码行数:13,代码来源:CodeDomUtils.cs
示例15: CreateShouldLogCatchedExceptionAsError
public void CreateShouldLogCatchedExceptionAsError()
{
using (MockDomain domain = new MockDomain())
{
MockAssemblyRepository repository = new MockAssemblyRepository();
QualifiedName fakeName = new QualifiedName(
typeof(string).FullName.Replace("mscorlib", "NonExistingAssemblyName"),
typeof(string).Assembly.FullName.Replace("mscorlib", "NonExistingAssemblyName"));
IPluginCreator tested = PluginCreator.GetCreator(domain);
MockLog mocklog = new MockLog((ILogWriter)tested);
PluginDescriptor descriptor = MockPluginDescriptor.For(fakeName);
Exception ex = DoAssert.Throws<PluginException>(() => tested.Create(descriptor, repository, null));
Assert.IsTrue(mocklog.Any(x => x.Level == MockLog.Level.Error && x.Message.Contains(ex.Message)));
}
}
开发者ID:ErikRydgren,项目名称:PluginFramework,代码行数:16,代码来源:UnitTest_PluginCreator.cs
示例16: FindProperty
public PropertyDefinition FindProperty(PropertyTreeDefinition definition,
Type componentType,
QualifiedName qn,
IEnumerable<PropertyTreeDefinition> ancestors)
{
// Allow any namespace contained in the definition base classes
var result = definition
.EnumerateProperties()
.FirstOrDefault(t => Compare(t, qn, definition));
if (result != null)
return result;
int dot = qn.LocalName.IndexOf('.');
if (dot > 0) {
// TODO Index whether the PTD has extenders so we can skip some ancestors (perf)
string prefix = qn.LocalName.Substring(0, dot);
foreach (var currentDef in ancestors) {
if (currentDef.Name == prefix) {
// TODO Local name could be different
var prop = currentDef.GetProperty(qn);
if (prop != null) {
return prop;
}
}
}
} else {
foreach (var curDefinition in ancestors) {
var prop = curDefinition.GetProperty(qn);
if (IsValidExtender(prop, componentType))
return prop;
var qn2 = qn.ChangeLocalName(curDefinition.Name + "." + qn.LocalName);
prop = curDefinition.GetProperty(qn2);
if (IsValidExtender(prop, componentType))
return prop;
}
}
return null;
}
开发者ID:Carbonfrost,项目名称:ff-property-trees,代码行数:45,代码来源:PropertyNameLookupHelper.cs
示例17: DefineProvider
public void DefineProvider(QualifiedName name,
Type providerType,
Type providerInstanceType,
object metadata = null)
{
if (providerType == null)
throw new ArgumentNullException("providerType");
if (providerInstanceType == null)
throw new ArgumentNullException("providerInstanceType");
if (providerInstanceType.IsAbstract || !providerType.IsAssignableFrom(providerInstanceType))
throw RuntimeFailure.InvalidProviderInstanceType("providerInstanceType");
var qn = GetName(name, providerInstanceType, providerInstanceType.Name);
var tr = new ProviderType(providerInstanceType, providerType, qn);
tr.Metadata = ProviderMetadataWrapper.Create(metadata);
tr.Metadata.Source = tr;
result.Add(tr);
}
开发者ID:Carbonfrost,项目名称:ff-foundations-runtime,代码行数:19,代码来源:ProviderRegistrationContext.cs
示例18: StateMachineTransitionEventArgs
/// <summary>
/// Creates a new instance.
/// </summary>
internal StateMachineTransitionEventArgs(QualifiedName fromState, QualifiedName toState, QualifiedName cause)
{
m_fromState = fromState;
m_toState = toState;
m_cause = cause;
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:9,代码来源:StateMachine.cs
示例19: CreateAuditEvent
/// <summary>
/// Creates an audit event for the cause.
/// </summary>
protected virtual AuditUpdateStateEvent CreateAuditEvent(
OperationContext context,
Transition transition,
QualifiedName cause,
Exception exception)
{
return AuditUpdateStateEvent.Construct(Server);
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:11,代码来源:StateMachine.cs
示例20: ReportAuditEvent
/// <summary>
/// Reports an audit event for the cause.
/// </summary>
protected virtual void ReportAuditEvent(OperationContext context, Transition transition, QualifiedName cause, Exception exception)
{
AuditUpdateStateEvent e = CreateAuditEvent(context, transition, cause, exception);
e.InitializeNewEvent();
e.Message.Value = Utils.Format("Method {0} was called.", cause);
e.SourceNode.Value = NodeId;
e.SourceName.Value = "Method/Call";
e.Severity.Value = 1;
e.ReceiveTime.Value = DateTime.UtcNow;
e.ActionTimeStamp.Value = DateTime.UtcNow;
e.OldStateId.Value = m_currentStateName.StateNumber;
e.NewStateId.Value = m_currentStateName.StateNumber;
if (context != null)
{
e.ClientAuditEntryId.Value = context.AuditEntryId;
e.ClientUserId.Value = context.Session.Identity.DisplayName;
}
if (transition != null)
{
e.OldStateId.Value = transition.FromState.StateNumber;
e.NewStateId.Value = transition.ToState.StateNumber;
}
ReportEvent(e);
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:32,代码来源:StateMachine.cs
注:本文中的QualifiedName类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论