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


C# QualifiedName类代码示例

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


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


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