本文整理汇总了C#中Mono.Cecil.PropertyDefinition.IsExplicitImplementation方法的典型用法代码示例。如果您正苦于以下问题:C# PropertyDefinition.IsExplicitImplementation方法的具体用法?C# PropertyDefinition.IsExplicitImplementation怎么用?C# PropertyDefinition.IsExplicitImplementation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Cecil.PropertyDefinition
的用法示例。
在下文中一共展示了PropertyDefinition.IsExplicitImplementation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WritePropertyInterfaceImplementations
protected override void WritePropertyInterfaceImplementations(PropertyDefinition property)
{
ICollection<ImplementedMember> implementedProperties = property.GetImplementedProperties();
if (property.IsExplicitImplementation())
{
if (implementedProperties.Any())
{
WriteImplementedMembers(implementedProperties);
}
}
else
{
ICollection<ImplementedMember> notExplicitlyImplementedProperties = GetNotExplicitlyImplementedMembers(implementedProperties);
if (notExplicitlyImplementedProperties.Any())
{
WriteImplementedMembers(notExplicitlyImplementedProperties);
}
}
}
示例2: WritePropertyDeclaration
protected override void WritePropertyDeclaration(PropertyDefinition property)
{
MethodDefinition moreVisibleMethod = property.GetMethod.GetMoreVisibleMethod(property.SetMethod);
if (property.IsIndexer())
{
WriteIndexerKeywords();
}
if (this.ModuleContext.RenamedMembers.Contains(property.MetadataToken.ToUInt32()))
{
WriteComment(property.Name);
WriteLine();
}
if (!property.IsExplicitImplementation())
{
WriteMethodVisibilityAndSpace(moreVisibleMethod);
}
if (!(property.IsVirtual() && !property.IsNewSlot()))
{
bool isIndexerProperty = property.IsIndexer();
if ((isIndexerProperty && IsIndexerPropertyHiding(property)) || (!isIndexerProperty && IsPropertyHiding(property)))
{
WriteKeyword(KeyWordWriter.Hiding);
WriteSpace();
}
}
if (property.IsVirtual() && !property.DeclaringType.IsInterface)
{
if (WritePropertyKeywords(property))
{
WriteSpace();
}
}
//covers the case of properties with only one of the get/set methods in VB
WriteReadOnlyWriteOnlyProperty(property);
if (property.IsStatic())
{
WriteKeyword(KeyWordWriter.Static);
WriteSpace();
}
if (KeyWordWriter.Property != null)
{
WriteKeyword(KeyWordWriter.Property);
WriteSpace();
}
if (property.IsIndexer())
{
if (WritePropertyAsIndexer(property))
{
return;
}
}
WritePropertyTypeAndNameWithArguments(property);
WritePropertyInterfaceImplementations(property);
}
示例3: WritePropertyAsIndexer
protected override bool WritePropertyAsIndexer(PropertyDefinition property)
{
string propertyName = KeyWordWriter.This;
if (property.IsExplicitImplementation())
{
int lastDotIndex = property.Name.LastIndexOf(".");
propertyName = property.Name.Replace(property.Name.Substring(lastDotIndex + 1), KeyWordWriter.This);
}
WriteTypeAndName(property.PropertyType, propertyName, property);
Write(IndexLeftBracket);
WritePropertyParameters(property);
Write(IndexRightBracket);
return true;
}