Skip to content

Compile ProcessImportedType in IDataContractSurrogate for unityaot #1183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#if !NO_CODEDOM
#if !NO_CODEDOM || UNITY_AOT
using System.CodeDom;
#endif
using System.Collections.ObjectModel;
Expand Down Expand Up @@ -73,7 +73,7 @@ public Type GetReferencedTypeOnImport(string typeName, string typeNamespace, obj
throw NotImplemented.ByDesign;
}

#if !NO_CODEDOM
#if !NO_CODEDOM || UNITY_AOT
public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit)
{
throw NotImplemented.ByDesign;
Expand Down
7 changes: 7 additions & 0 deletions mcs/class/System/System.CodeDom/CodeCompileUnit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#if UNITY_AOT

public class CodeCompileUnit
{
}

#endif
7 changes: 7 additions & 0 deletions mcs/class/System/System.CodeDom/CodeTypeDeclaration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#if UNITY_AOT

public class CodeTypeDeclaration
{
}

#endif
2 changes: 2 additions & 0 deletions mcs/class/System/unityaot_System.dll.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
../System.Web/System.Web/HttpUtility.cs
../System.Web/System.Web.Util/Helpers.cs
../System.Web/System.Web.Util/HttpEncoder.cs
System.CodeDom/CodeCompileUnit.cs
System.CodeDom/CodeTypeDeclaration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IDataContractSurrogate
object GetCustomDataToExport(Type clrType, Type dataContractType);
void GetKnownCustomDataTypes(Collection<Type> customDataTypes);
Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData);
#if !NO_CODEDOM
#if !NO_CODEDOM || UNITY_AOT
CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit);
#endif
}
Expand Down Expand Up @@ -70,11 +70,11 @@ internal static Type GetReferencedTypeOnImport(IDataContractSurrogate surrogate,
return null;
return surrogate.GetReferencedTypeOnImport(typeName, typeNamespace, customData);
}
#if !NO_CODEDOM
#if !NO_CODEDOM || UNITY_AOT
internal static CodeTypeDeclaration ProcessImportedType(IDataContractSurrogate surrogate, CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit)
{
return surrogate.ProcessImportedType(typeDeclaration, compileUnit);
}
#endif
}
}
}