protected static MemberName MakeMemberName (MemberBase host, string name, int unique_id, TypeParameters tparams, Location loc) { string host_name = host == null ? null : host is InterfaceMemberBase ? ((InterfaceMemberBase)host).GetFullName (host.MemberName) : host.MemberName.Name; string tname = MakeName (host_name, "c", name, unique_id); TypeParameters args = null; if (tparams != null) { args = new TypeParameters (tparams.Count); // Type parameters will be filled later when we have TypeContainer // instance, for now we need only correct arity to create valid name for (int i = 0; i < tparams.Count; ++i) args.Add ((TypeParameter) null); } return new MemberName (tname, args, loc); }
public DynamicSiteClass (TypeDefinition parent, MemberBase host, TypeParameters tparams) : base (parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC, MemberKind.Class) { parent.DynamicSitesCounter++; }
public AnonymousMethodStorey (ExplicitBlock block, TypeDefinition parent, MemberBase host, TypeParameters tparams, string name, MemberKind kind) : base (parent, MakeMemberName (host, name, parent.PartialContainer.CounterAnonymousContainers, tparams, block.StartLocation), tparams, 0, kind) { OriginalSourceBlock = block; ID = parent.PartialContainer.CounterAnonymousContainers++; }