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


C# XamlType.GetAliasedProperty方法代码示例

本文整理汇总了C#中XamlType.GetAliasedProperty方法的典型用法代码示例。如果您正苦于以下问题:C# XamlType.GetAliasedProperty方法的具体用法?C# XamlType.GetAliasedProperty怎么用?C# XamlType.GetAliasedProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XamlType的用法示例。


在下文中一共展示了XamlType.GetAliasedProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetAliasedProperty

		public void GetAliasedProperty ()
		{
			XamlMember xm;
			var xt = new XamlType (typeof (SeverlyAliasedClass), new XamlSchemaContext (null, null));
			xm = xt.GetAliasedProperty (XamlLanguage.Key);
			Assert.IsNotNull (xm, "#1");
			xm = xt.GetAliasedProperty (XamlLanguage.Name);
			Assert.IsNotNull (xm, "#2");
			xm = xt.GetAliasedProperty (XamlLanguage.Uid);
			Assert.IsNotNull (xm, "#3");
			xm = xt.GetAliasedProperty (XamlLanguage.Lang);
			Assert.IsNotNull (xm, "#4");
			
			xt = new XamlType (typeof (Dictionary<int,string>), xt.SchemaContext);
			Assert.IsNull (xt.GetAliasedProperty (XamlLanguage.Key), "#5");
		}
开发者ID:spencerhakim,项目名称:mono,代码行数:16,代码来源:XamlTypeTest.cs

示例2: IsDirectiveAllowedOnNullInstance

 private bool IsDirectiveAllowedOnNullInstance(XamlMember xamlMember, XamlType xamlType)
 {
     return ((xamlMember == XamlLanguage.Key) || ((xamlMember == XamlLanguage.Uid) && (null == xamlType.GetAliasedProperty(XamlLanguage.Uid))));
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:XamlObjectWriter.cs

示例3: IsNameProperty

 internal static bool IsNameProperty(XamlMember member, XamlType owner)
 {
     if (member == owner.GetAliasedProperty(XamlLanguage.Name)
          || XamlLanguage.Name == member)
     {
         return true;
     }
     return false;
 }
开发者ID:mind0n,项目名称:hive,代码行数:9,代码来源:FrameworkTemplate.cs

示例4: GetKeyFromInstance

 private object GetKeyFromInstance(object instance, XamlType instanceType, IAddLineInfo lineInfo)
 {
     XamlMember aliasedProperty = instanceType.GetAliasedProperty(XamlLanguage.Key);
     if ((aliasedProperty == null) || (instance == null))
     {
         throw lineInfo.WithLineInfo(new XamlObjectWriterException(System.Xaml.SR.Get("MissingKey", new object[] { instanceType.Name })));
     }
     return this.Runtime.GetValue(instance, aliasedProperty);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:XamlObjectWriter.cs

示例5: Initialize

 public void Initialize(XamlParserContext context, XamlType tagType, string ownerNamespace, bool tagIsRoot)
 {
     if (this.Kind != ScannerAttributeKind.Namespace)
     {
         this.Property = this.GetXamlAttributeProperty(context, this.Name, tagType, ownerNamespace, tagIsRoot);
         if (this.Property.IsUnknown)
         {
             this.Kind = ScannerAttributeKind.Unknown;
         }
         else if (this.Property.IsEvent)
         {
             this.Kind = ScannerAttributeKind.Event;
         }
         else if (this.Property.IsDirective)
         {
             if (this.Property == XamlLanguage.Space)
             {
                 this.Kind = ScannerAttributeKind.XmlSpace;
             }
             else if (((this.Property == XamlLanguage.FactoryMethod) || (this.Property == XamlLanguage.Arguments)) || ((this.Property == XamlLanguage.TypeArguments) || (this.Property == XamlLanguage.Base)))
             {
                 this.Kind = ScannerAttributeKind.CtorDirective;
             }
             else
             {
                 this.Kind = ScannerAttributeKind.Directive;
             }
         }
         else if (this.Property.IsAttachable)
         {
             this.Kind = ScannerAttributeKind.AttachableProperty;
         }
         else if (this.Property == tagType.GetAliasedProperty(XamlLanguage.Name))
         {
             this.Kind = ScannerAttributeKind.Name;
         }
         else
         {
             this.Kind = ScannerAttributeKind.Property;
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:42,代码来源:XamlAttribute.cs


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