in ReSharper.FSharp/src/FSharp/FSharp.TypeProviders.Protocol/src/Models/ProxyProvidedType.cs [232:289]
public override ProvidedType MakePointerType() =>
TypeProvidersContext.ProvidedTypesCache.GetOrCreate(
myMakePointerTypeId ??=
TypeProvidersContext.Connection.ExecuteWithCatch(() =>
RdProvidedTypeProcessModel.MakePointerType.Sync(EntityId)),
TypeProvider);
public override ProvidedType MakeByRefType() =>
TypeProvidersContext.ProvidedTypesCache.GetOrCreate(
myMakeByRefTypeId ??=
TypeProvidersContext.Connection.ExecuteWithCatch(() =>
RdProvidedTypeProcessModel.MakeByRefType.Sync(EntityId)),
TypeProvider);
public override ProvidedEventInfo[] GetEvents() => myContent.Value.Events;
public override ProvidedEventInfo GetEvent(string nm) => GetEvents().FirstOrDefault(t => t.Name == nm);
public override ProvidedFieldInfo[] GetFields() => myContent.Value.Fields;
public override ProvidedFieldInfo GetField(string nm) => GetFields().FirstOrDefault(t => t.Name == nm);
public override ProvidedConstructorInfo[] GetConstructors() => myContent.Value.Constructors;
public override ProvidedType ApplyContext(ProvidedTypeContext context) =>
ProxyProvidedTypeWithContext.Create(this, context);
public override ProvidedAssembly Assembly => myProvidedAssembly ??=
TypeProvidersContext.ProvidedAssembliesCache.GetOrCreate(myRdProvidedType.Assembly, TypeProvider);
public override ProvidedVar AsProvidedVar(string nm) =>
ProxyProvidedVar.Create(nm, false, this);
public override
FSharpOption<Tuple<FSharpList<FSharpOption<object>>, FSharpList<Tuple<string, FSharpOption<object>>>>>
GetAttributeConstructorArgs(ITypeProvider _, string attribName) =>
TypeProvidersContext.ProvidedCustomAttributeProvider.GetAttributeConstructorArgs(myCustomAttributes.Value,
attribName);
public override FSharpOption<Tuple<string, int, int>> GetDefinitionLocationAttribute(ITypeProvider _) =>
TypeProvidersContext.ProvidedCustomAttributeProvider.GetDefinitionLocationAttribute(myCustomAttributes.Value);
public override string[] GetXmlDocAttributes(ITypeProvider _) =>
myXmlDocs ??=
TypeProvidersContext.ProvidedCustomAttributeProvider.GetXmlDocAttributes(myCustomAttributes.Value);
public override bool GetHasTypeProviderEditorHideMethodsAttribute(ITypeProvider _) =>
TypeProvidersContext.ProvidedCustomAttributeProvider.GetHasTypeProviderEditorHideMethodsAttribute(
myCustomAttributes.Value);
public IClrTypeName GetClrName() => new ClrTypeName(FullName);
public override bool Equals(object y) =>
y switch
{
ProxyProvidedType x => x.EntityId == EntityId,
_ => false
};