Skip to content

Commit

Permalink
Fix Access Violation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Michannne committed Apr 30, 2019
1 parent dd54fc2 commit e5f9627
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions GraphQL-Core/CSharpClassBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ namespace GraphQLCore
/// </summary>
public static class GraphQLCoreTypeWrapperGenerator
{
internal static AssemblyBuilder asmBuilder = AssemblyBuilder.DefineDynamicAssembly(CreateDynamicAssemblyName(), AssemblyBuilderAccess.Run);
internal static ModuleBuilder mdBuilder = null;
internal static string typeNameAppend = "GQLCoreTypeWrapper";
internal static string asmNameAppend = "._Hidden_GraphQLCoreDynamicTypes";
internal static string mdName = "GraphQLCoreDynamic";
internal static Dictionary<Type, Type> genericTypeParentClasses = new Dictionary<Type, Type>();
private static AssemblyBuilder asmBuilder = AssemblyBuilder.DefineDynamicAssembly(CreateDynamicAssemblyName(), AssemblyBuilderAccess.Run);
private static ModuleBuilder mdBuilder = null;
private static string typeNameAppend = "GQLCoreTypeWrapper";
private static string asmNameAppend = "._Hidden_GraphQLCoreDynamicTypes";
private static string mdName = "GraphQLCoreDynamic";
private static Dictionary<Type, Type> genericTypeParentClasses = new Dictionary<Type, Type>();

internal static Type CreateGraphQLTypeWrapper<T>()
public static Type CreateGraphQLTypeWrapper<T>()
{
if (genericTypeParentClasses.ContainsKey(typeof(GenericType<T>)))
return genericTypeParentClasses[typeof(GenericType<T>)];
Expand All @@ -34,15 +34,15 @@ internal static Type CreateGraphQLTypeWrapper<T>()
return type;
}

internal static Type GetDerivedGenericUserType<T>()
public static Type GetDerivedGenericUserType<T>()
{
if(genericTypeParentClasses.ContainsKey(typeof(T)))
return genericTypeParentClasses[typeof(T)];

return null;
}

internal static Type GetDerivedGenericUserType(this Type T)
public static Type GetDerivedGenericUserType(this Type T)
{
if (genericTypeParentClasses.ContainsKey(T))
return genericTypeParentClasses[T];
Expand Down
2 changes: 1 addition & 1 deletion GraphQL-Core/Extensions/GraphQLExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class GraphQLExtensions
/// </summary>
/// <param name="cSharpType">The C# Type to convert</param>
/// <returns>An appropriate GraphQL.NET Type</returns>
internal static Type ConvertToGraphQLType(this Type cSharpType)
public static Type ConvertToGraphQLType(this Type cSharpType)
{
Type returnType;
if (false
Expand Down
2 changes: 1 addition & 1 deletion GraphQL-Core/Schemas/Schemas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GraphQLCore.Schemas
/// <summary>
/// Interface tag for GraphQLCore Schemas
/// </summary>
internal interface IGraphQLGenericSchema { }
public interface IGraphQLGenericSchema { }

/// <summary>
/// Schema which will be used to combine all user-provided queries
Expand Down
2 changes: 1 addition & 1 deletion GraphQL-Core/Types/Types.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GraphQLCore.Types
/// <summary>
/// Interface tag for GraphQLCore Types
/// </summary>
internal interface IGraphQLGenericType { }
public interface IGraphQLGenericType { }

/// <summary>
/// Acts a container for user-defined model fields for a GraphQL Type
Expand Down

0 comments on commit e5f9627

Please sign in to comment.