Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Commit

Permalink
RIP ANI :(
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Feb 13, 2015
1 parent e759552 commit 5f8bf56
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 1,258 deletions.
39 changes: 1 addition & 38 deletions samples/HelloWorld/compiler/preprocess/HelloMetaProgramming.cs
Expand Up @@ -34,41 +34,4 @@ public void AfterCompile(IAfterCompileContext context)

}
}
}

namespace Microsoft.Framework.Runtime
{
[AssemblyNeutral]
public class AssemblyNeutralAttribute : Attribute
{
}

/// <summary>
/// Summary description for ICompileModule
/// </summary>
[AssemblyNeutral]
public interface ICompileModule
{
void BeforeCompile(IBeforeCompileContext context);

void AfterCompile(IAfterCompileContext context);
}

[AssemblyNeutral]
public interface IBeforeCompileContext
{
CSharpCompilation CSharpCompilation { get; set; }

IList<ResourceDescription> Resources { get; }

IList<Diagnostic> Diagnostics { get; }
}

[AssemblyNeutral]
public interface IAfterCompileContext
{
CSharpCompilation CSharpCompilation { get; set; }

IList<Diagnostic> Diagnostics { get; }
}
}
}
2 changes: 1 addition & 1 deletion samples/HelloWorld/project.json
Expand Up @@ -3,7 +3,7 @@
"exclude": "more/*.cs",
"dependencies": {
"HelloShared": { "version": "0.1-beta-*", "type": "build" },
"Microsoft.CodeAnalysis.CSharp": "1.0.0-rc1-*"
"Microsoft.Framework.Runtime.Roslyn.Interfaces": "1.0.0-*"
},
"commands": {
"hi": "HelloWorld --mode amazing",
Expand Down
Expand Up @@ -13,8 +13,5 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
</PropertyGroup>
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
25 changes: 0 additions & 25 deletions src/Microsoft.Framework.Runtime.Loader/LoadContext.cs
Expand Up @@ -34,7 +34,6 @@ protected override Assembly Load(AssemblyName assemblyName)
if (assembly != null)
{
_assemblyCache[name] = assembly;
ExtractAssemblyNeutralInterfaces(assembly);
}
}

Expand Down Expand Up @@ -101,30 +100,6 @@ public void Dispose()
{

}

private void ExtractAssemblyNeutralInterfaces(Assembly assembly)
{
// Embedded assemblies end with .dll
foreach (var resourceName in assembly.GetManifestResourceNames())
{
if (resourceName.StartsWith("AssemblyNeutral/") &&
resourceName.EndsWith(".dll"))
{
var assemblyName = Path.GetFileNameWithoutExtension(resourceName);

var neutralAssemblyStream = assembly.GetManifestResourceStream(resourceName);

try
{
_defaultContext.LoadStream(neutralAssemblyStream, assemblySymbols: null);
}
catch (FileLoadException)
{
// Already loaded
}
}
}
}
}
#else
public abstract class LoadContext : IAssemblyLoadContext
Expand Down

This file was deleted.

This file was deleted.

5 comments on commit 5f8bf56

@ChrisMcKee
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOOOOOOOO!

@adamralph
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

@Jetski5822
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, whats with this?

@markrendle
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOOO!

@damianh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 It was a poor man's structural typing.

Please sign in to comment.