本文整理汇总了C#中ITypeDefinition.GetProperties方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeDefinition.GetProperties方法的具体用法?C# ITypeDefinition.GetProperties怎么用?C# ITypeDefinition.GetProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeDefinition
的用法示例。
在下文中一共展示了ITypeDefinition.GetProperties方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GeneratePropertyFields
/// <summary>
/// Generates backing fields for automatic properties, and fake fields for properties who are defined as fields
/// </summary>
/// <param name="ce"></param>
/// <returns></returns>
protected IEnumerable<IField> GeneratePropertyFields(ITypeDefinition ce, bool isStatic)
{
//var list = new List<IField>();
foreach (var pe in ce.GetProperties(t => t.IsStatic == isStatic, GetMemberOptions.IgnoreInheritedMembers))
{
if (!Sk.IsJsExported(pe))
continue;
if (Sk.IsNativeField(pe))
yield return GenerateFakeField(pe);
else if (pe.IsAutomaticProperty())
yield return GenerateBackingField(pe);
}
//return list;
}
示例2: Visit
public override void Visit(ITypeDefinition typeDefinition)
{
VisitTypeDefinitionNoMembers(typeDefinition);
this.Visit(typeDefinition.Events);
this.Visit(typeDefinition.GetFields(Context));
this.Visit(typeDefinition.GetMethods(Context));
this.VisitNestedTypes(typeDefinition.GetNestedTypes(Context));
this.Visit(typeDefinition.GetProperties(Context));
}
示例3: ExportCustomAttributes
private List<JsClrAttribute> ExportCustomAttributes(ITypeDefinition ce)
{
var list = new List<JsClrAttribute>();
list.AddRange(ExportAttributes(ce, ce.Attributes));
foreach (var me in ce.GetMethods())
{
list.AddRange(ExportAttributes(me, me.Attributes));
}
foreach (var pe in ce.GetProperties())
{
list.AddRange(ExportAttributes(pe, pe.Attributes));
}
return list;
}