Skip to content

Commit

Permalink
Package published.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathtone committed Jun 20, 2016
1 parent 897d3fd commit 26e2e2d
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Mathtone.MIST.Builder/Mathtone.MIST.Builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mathtone.MIST</RootNamespace>
<AssemblyName>Mathtone.MIST.Builder</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion Mathtone.MIST.Builder/NotificationWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public NotificationWeaver(string assemblyPath) {
this.resolver.AddSearchDirectory(Path.GetDirectoryName(assemblyPath));
this.mdResolver = new MetadataResolver(resolver);


}

/// <summary>
Expand Down
11 changes: 7 additions & 4 deletions Mathtone.MIST.Builder/Processors/AssemblyProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Linq;
using System.Text;


namespace Mathtone.MIST.Processors {

public class AssemblyProcessor : IDefinitionProcessor<AssemblyDefinition> {
Expand All @@ -17,8 +16,7 @@ public AssemblyProcessor(MetadataResolver metadataResolver) {
}

public void Process(AssemblyDefinition definition) {
var attr = GetAttribute(definition, typeof(MistedAssemblyAttribute));
if (attr != null) {
if (IsMisted(definition)) {
return;
}

Expand All @@ -43,7 +41,12 @@ void AddImplementationSummary(AssemblyDefinition assemblyDefinition) {
assemblyDefinition.CustomAttributes.Add(attribute);
}

protected bool IsMisted(AssemblyDefinition definition) {
var attr = GetAttribute(definition, typeof(MistedAssemblyAttribute));
return (attr != null);
}

public CustomAttribute GetAttribute(AssemblyDefinition definition, Type attributeType) =>
definition.CustomAttributes.SingleOrDefault(a => a.AttributeType.FullName == attributeType.FullName);
}
}
}
11 changes: 11 additions & 0 deletions Mathtone.MIST.Builder/Processors/PropertyStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@


namespace Mathtone.MIST.Processors {
/// <summary>
/// Encapsulates details describing the method by which notification will be implemented.
/// </summary>
/// <seealso cref="Mathtone.MIST.Processors.ImplementationStrategy" />
class PropertyStrategy : ImplementationStrategy {

static OpCode[] simpleInstructions = new[] {
Expand All @@ -16,6 +20,13 @@ class PropertyStrategy : ImplementationStrategy {
OpCodes.Ret
};

/// <summary>
/// Initializes a new instance of the <see cref="PropertyStrategy"/> class.
/// </summary>
/// <param name="definition">The property definition.</param>
/// <param name="mode">Explicit/implicit mode.</param>
/// <param name="defaultStyle">The notification style that will be used if none is specified.</param>
/// <param name="target">Notificaiton target method.</param>
public PropertyStrategy(PropertyDefinition definition, NotificationMode mode,
NotificationStyle defaultStyle, MethodReference target) {

Expand Down
3 changes: 0 additions & 3 deletions Mathtone.MIST.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mathtone.MIST.Tests.NotifierBase", "Tests\Mathtone.MIST.Tests.NotifierBase\Mathtone.MIST.Tests.NotifierBase.csproj", "{2B849608-BB74-456B-89C2-16ABAA185718}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nuget Package", "Nuget Package", "{06497501-7922-440F-91C4-738B687B437D}"
ProjectSection(SolutionItems) = preProject
Mathtone.MIST.2.0.0.nupkg = Mathtone.MIST.2.0.0.nupkg
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion Mathtone.MIST/Mathtone.MIST.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mathtone.MIST</RootNamespace>
<AssemblyName>Mathtone.MIST</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mathtone.MIST.NotifierBase</RootNamespace>
<AssemblyName>Mathtone.MIST.NotifierBase</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mathtone.MIST.Tests.NugetScriptTest</RootNamespace>
<AssemblyName>Mathtone.MIST.Tests.NugetScriptTest</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Mathtone.MIST.Tests.NugetScriptTest/app.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
2 changes: 1 addition & 1 deletion Tests/Mathtone.MIST.Tests.NugetScriptTest/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mathtone.MIST" version="2.0.0" targetFramework="net46" developmentDependency="true" />
<package id="Mathtone.MIST" version="2.0.0" targetFramework="net46" developmentDependency="true" requireReinstallation="true" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mathtone.MIST.TestNotifier</RootNamespace>
<AssemblyName>Mathtone.MIST.TestNotifier</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mathtone.MIST.Tests</RootNamespace>
<AssemblyName>Mathtone.MIST.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand Down
14 changes: 7 additions & 7 deletions Tests/Mathtone.MIST.Tests.UnitTests/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void InitializeStandardAssembly() {
public void Misted_Assembly_Attribute() {
//Assembly.GetAssembly()
var assembly = Assembly.LoadFile(TestNotifierPath);
var attribute = assembly.GetCustomAttributes(typeof(MistedAssemblyAttribute),false).SingleOrDefault();
var attribute = assembly.GetCustomAttributes(typeof(MistedAssemblyAttribute), false).SingleOrDefault();
Assert.IsNotNull(attribute, "MistedAssemblyAttribute Not found");
}
#endregion
Expand Down Expand Up @@ -208,9 +208,9 @@ public void OnChange_for_New_ValueTypes() {
[TestMethod]
public void OnSet_for_New_ReferenceTypes() {
var notifier = new ExplicitValueTypeNotifier_Specialized();
var expectedObject = new object();
notifier.OnSetVirtualObject = expectedObject;
Assert.AreEqual(expectedObject, notifier.OnSetVirtualObject);
var expectedObject = new object();
notifier.OnSetVirtualObject = expectedObject;
Assert.AreEqual(expectedObject, notifier.OnSetVirtualObject);
notifier.OnSetVirtualObject = expectedObject;
Assert.AreEqual(2, notifier.ChangeCount);
}
Expand All @@ -220,9 +220,9 @@ public void OnChange_for_New_ReferenceTypes() {
var notifier = new ExplicitValueTypeNotifier_Specialized();
var expectedObject = new object();
notifier.OnChangeVirtualObject = expectedObject;
Assert.AreEqual(expectedObject, notifier.OnChangeVirtualObject);
notifier.OnChangeVirtualObject = expectedObject;
Assert.AreEqual(1, notifier.ChangeCount);
Assert.AreEqual(expectedObject, notifier.OnChangeVirtualObject);
notifier.OnChangeVirtualObject = expectedObject;
Assert.AreEqual(1, notifier.ChangeCount);
}

#endregion Class inheritance
Expand Down
2 changes: 1 addition & 1 deletion cecil-master/Mono.Cecil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectGuid>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</ProjectGuid>
<RootNamespace>Mono.Cecil</RootNamespace>
<AssemblyName>Mono.Cecil</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'net_4_6_debug'">
Expand Down
2 changes: 1 addition & 1 deletion cecil-master/symbols/pdb/Mono.Cecil.Pdb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<RootNamespace>Mono.Cecil.Pdb</RootNamespace>
<AssemblyName>Mono.Cecil.Pdb</AssemblyName>
<NoWarn>0649</NoWarn>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'net_4_6_debug'">
Expand Down

0 comments on commit 26e2e2d

Please sign in to comment.