private static IndirectMethodSpecialization InitializeInstance(IndirectMethodSpecialization instance) { instance.genericParameterCache = new Lazy <IReadOnlyList <IGenericParameter> >( instance.CreateGenericParameters); MethodSpecialization.InitializeInstance(instance); instance.qualName = instance.Declaration.Name.Qualify( instance.parentTy.FullName); return(instance); }
private static DirectMethodSpecialization InitializeInstance(DirectMethodSpecialization instance) { var genericArguments = instance.GenericArguments; var simpleTypeArgNames = new QualifiedName[genericArguments.Count]; var qualTypeArgNames = new QualifiedName[simpleTypeArgNames.Length]; for (int i = 0; i < qualTypeArgNames.Length; i++) { simpleTypeArgNames[i] = genericArguments[i].Name.Qualify(); qualTypeArgNames[i] = genericArguments[i].FullName; } instance.unqualName = new GenericName(instance.Declaration.Name, simpleTypeArgNames); instance.qualName = new GenericName(instance.Declaration.FullName, qualTypeArgNames).Qualify(); MethodSpecialization.InitializeInstance(instance); return(instance); }