public static string GetPropertyRef(IMember property, IEmitter emitter, bool isSetter = false, bool noOverload = false, bool ignoreInterface = false, bool withoutTypeParams = false, bool skipPrefix = true) { var attrName = emitter.GetEntityNameFromAttr(property, isSetter); if (!String.IsNullOrEmpty(attrName)) { return(Helpers.AddInterfacePrefix(property, emitter, ignoreInterface, attrName, isSetter)); } string name = null; if (property.SymbolKind == SymbolKind.Indexer) { skipPrefix = false; } if (!noOverload) { var overloads = OverloadsCollection.Create(emitter, property, isSetter); return(overloads.GetOverloadName(ignoreInterface, skipPrefix ? null : Helpers.GetSetOrGet(isSetter), withoutTypeParams)); } name = emitter.GetEntityName(property); return(skipPrefix ? name : Helpers.GetSetOrGet(isSetter, name)); }
public static string GetPropertyRef(IndexerDeclaration property, IEmitter emitter, bool isSetter = false, bool noOverload = false, bool ignoreInterface = false) { ResolveResult resolveResult = emitter.Resolver.ResolveNode(property, emitter) as MemberResolveResult; if (resolveResult != null && ((MemberResolveResult)resolveResult).Member != null) { return(Helpers.GetIndexerRef(((MemberResolveResult)resolveResult).Member, emitter, isSetter, noOverload, ignoreInterface)); } if (!noOverload) { var overloads = OverloadsCollection.Create(emitter, property, isSetter); return(overloads.GetOverloadName(ignoreInterface, Helpers.GetSetOrGet(isSetter))); } var name = emitter.GetEntityName(property); return(Helpers.GetSetOrGet(isSetter, name)); }
public static string GetIndexerRef(IMember property, IEmitter emitter, bool isSetter = false, bool noOverload = false, bool ignoreInterface = false) { var attrName = emitter.GetEntityNameFromAttr(property, isSetter); if (!String.IsNullOrEmpty(attrName)) { return(Helpers.AddInterfacePrefix(property, emitter, ignoreInterface, attrName, isSetter)); } if (!noOverload) { var overloads = OverloadsCollection.Create(emitter, property, isSetter); return(overloads.GetOverloadName(ignoreInterface, Helpers.GetSetOrGet(isSetter))); } var name = emitter.GetEntityName(property); return(Helpers.GetSetOrGet(isSetter, name)); }
public static string GetPropertyRef(PropertyDeclaration property, IEmitter emitter, bool isSetter = false, bool noOverload = false, bool ignoreInterface = false, bool withoutTypeParams = false, bool skipPrefix = true) { ResolveResult resolveResult = emitter.Resolver.ResolveNode(property, emitter) as MemberResolveResult; if (resolveResult != null && ((MemberResolveResult)resolveResult).Member != null) { return(Helpers.GetPropertyRef(((MemberResolveResult)resolveResult).Member, emitter, isSetter, noOverload, ignoreInterface, withoutTypeParams, skipPrefix)); } string name; if (!noOverload) { var overloads = OverloadsCollection.Create(emitter, property, isSetter); return(overloads.GetOverloadName(ignoreInterface, skipPrefix ? null : Helpers.GetSetOrGet(isSetter), withoutTypeParams)); } name = emitter.GetEntityName(property); return(Helpers.GetSetOrGet(isSetter, name)); }