コード例 #1
0
ファイル: Helpers.cs プロジェクト: michaelmarechal/Bridge
        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));
        }