internal override bool TryGetAnonymousTypeName( AnonymousTypeManager.AnonymousTypeTemplateSymbol template, [NotNullWhen(true)] out string?name, out int index ) { Debug.Assert(this.Compilation == template.DeclaringCompilation); return(_previousDefinitions.TryGetAnonymousTypeName(template, out name, out index)); }
internal bool TryGetAnonymousTypeName(AnonymousTypeManager.AnonymousTypeTemplateSymbol type, out string name, out int index) { if (TryFindAnonymousType(type, out var otherType)) { name = otherType.Name; index = otherType.UniqueIndex; return(true); } name = null; index = -1; return(false); }
internal bool TryGetAnonymousTypeName(AnonymousTypeManager.AnonymousTypeTemplateSymbol template, out string name, out int index) { return(_symbols.TryGetAnonymousTypeName(template, out name, out index)); }
internal bool TryFindAnonymousType(AnonymousTypeManager.AnonymousTypeTemplateSymbol type, out AnonymousTypeValue otherType) { Debug.Assert((object)type.ContainingSymbol == (object)_sourceAssembly.GlobalNamespace); return(_anonymousTypeMap.TryGetValue(type.GetAnonymousTypeKey(), out otherType)); }
internal bool TryGetAnonymousTypeName(AnonymousTypeManager.AnonymousTypeTemplateSymbol template, out string name, out int index) => _mapToPrevious.TryGetAnonymousTypeName(template, out name, out index);
internal bool TryGetAnonymousTypeName(AnonymousTypeManager.AnonymousTypeTemplateSymbol template, [NotNullWhen(true)] out string?name, out int index) => _symbols.TryGetAnonymousTypeName(template, out name, out index);