Skip to content

Commit 2dad9b0

Browse files
Merge pull request #26 from Capgemini/master
Actualize original
2 parents 292f5b2 + 0d0d123 commit 2dad9b0

File tree

5,178 files changed

+92721
-13051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,178 files changed

+92721
-13051
lines changed

Fody/Cauldron.ActivatorInterceptors/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// "3.0.0.8")]
35-
[assembly: AssemblyVersion("3.2.0.0")]
36-
[assembly: AssemblyFileVersion("3.2.0.0")]
35+
[assembly: AssemblyVersion("3.2.0.2")]
36+
[assembly: AssemblyFileVersion("3.2.0.2")]

Fody/Cauldron.BasicInterceptors/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// "3.0.0.8")]
35-
[assembly: AssemblyVersion("3.2.0.0")]
36-
[assembly: AssemblyFileVersion("3.2.0.0")]
35+
[assembly: AssemblyVersion("3.2.0.2")]
36+
[assembly: AssemblyFileVersion("3.2.0.2")]

Fody/Cauldron.Interception.Cecilator/AsyncMethodHelper.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public object Instance
4848
return result;
4949
}
5050

51-
return (object)CodeBlocks.This;
51+
return CodeBlocks.This;
5252
}
5353
}
5454

@@ -134,14 +134,14 @@ public Method MoveNextMethod
134134
}
135135

136136
/// <summary>
137-
/// Gets the type that inherited the async method.
137+
/// Returns the variable that contains the current state of the async state machine
138138
/// </summary>
139-
public BuilderType OriginType => this.Method.OriginType;
139+
public LocalVariable StateVariable => this.MoveNextMethod?.GetVariable(0);
140140

141141
/// <summary>
142-
/// Returns the variable that contains the current state of the async state machine
142+
/// Gets the type that inherited the async method.
143143
/// </summary>
144-
public LocalVariable StateVariable => this.MoveNextMethod?.GetVariable(0);
144+
public BuilderType OriginType => this.Method.OriginType;
145145

146146
public Tuple<Positions, ExceptionHandler> GetAsyncStateMachineExceptionBlock()
147147
{
@@ -187,7 +187,7 @@ public LocalVariable GetAsyncStateMachineExceptionVariable()
187187
/// <returns></returns>
188188
public Position GetAsyncStateMachineLastGetResult()
189189
{
190-
var lastGetResult = this.MoveNextMethod.methodDefinition.Body.Instructions.Last(x =>
190+
var lastGetResult = this.MoveNextMethod.methodDefinition.Body.Instructions.LastOrDefault(x =>
191191
{
192192
if (x.OpCode == OpCodes.Call)
193193
{
@@ -211,7 +211,7 @@ public Position GetAsyncStateMachineLastGetResult()
211211
/// <returns></returns>
212212
public Position GetAsyncStateMachineLastSetResult()
213213
{
214-
var lastSetResult = this.MoveNextMethod.methodDefinition.Body.Instructions.Last(x =>
214+
var lastSetResult = this.MoveNextMethod.methodDefinition.Body.Instructions.LastOrDefault(x =>
215215
{
216216
if (x.OpCode == OpCodes.Call)
217217
{
@@ -265,7 +265,7 @@ public Position GetAsyncTaskMethodBuilderStart()
265265
}
266266

267267
public Field InsertFieldToAsyncStateMachine(string fieldName, BuilderType fieldType, Func<Coder, object> setCoder) =>
268-
InsertFieldToAsyncStateMachine(fieldName, fieldType.typeReference, setCoder);
268+
this.InsertFieldToAsyncStateMachine(fieldName, fieldType.typeReference, setCoder);
269269

270270
public Field InsertFieldToAsyncStateMachine(string fieldName, TypeReference fieldType, Func<Coder, object> setCoder)
271271
{

Fody/Cauldron.Interception.Cecilator/Coders/Default/Coder.cs

Lines changed: 68 additions & 115 deletions
Large diffs are not rendered by default.

Fody/Cauldron.Interception.Cecilator/Extension.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ TypeReference getIEnumerableInterfaceChild(TypeReference typeReference)
425425
return new Tuple<TypeReference, bool>(module.ImportReference(result), true);
426426

427427
// We just don't know :(
428-
return new Tuple<TypeReference, bool>(module.ImportReference((TypeReference)BuilderTypes.Object), false);
428+
return new Tuple<TypeReference, bool>(module.ImportReference(typeof(object)), false);
429429
}
430430

431431
public static IReadOnlyDictionary<string, TypeReference> GetGenericResolvedTypeName(this GenericInstanceType type)
@@ -521,7 +521,7 @@ public static IEnumerable<TypeReference> GetInterfaces(this TypeReference type)
521521
}
522522
catch (Exception e)
523523
{
524-
Builder.Current.Log(LogTypes.Info, e.GetStackTrace());
524+
Builder.Current.Log(LogTypes.Info, $"Error in getting interfaces of '{type}'\r\n" + e.GetStackTrace());
525525
break;
526526
}
527527
};
@@ -1418,6 +1418,9 @@ internal static IEnumerable<T> Recursive<T>(this T root, Func<T, IEnumerable<T>>
14181418
{
14191419
var current = stack.Pop();
14201420

1421+
if (current == null)
1422+
Builder.Current.Log(LogTypes.Info, $"-------------------> '{root}'\r\n");
1423+
14211424
foreach (var child in children(current))
14221425
stack.Push(child);
14231426

Fody/Cauldron.Interception.Cecilator/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
//
2525
// Major Version Minor Version Build Number Revision
2626
//
27-
[assembly: AssemblyVersion("3.2.0.0")]
28-
[assembly: AssemblyFileVersion("3.2.0.0")]
27+
[assembly: AssemblyVersion("3.2.0.2")]
28+
[assembly: AssemblyFileVersion("3.2.0.2")]

Fody/Cauldron.Interception.Fody/ModuleWeaver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private void AddEntranceAssemblyHACK(Builder builder)
9191
}
9292
}
9393

94-
CreateAssemblyListingArray(builder, referencedAssembliesMethod, assembly.Type, builder.ReferencedAssemblies);
94+
this.CreateAssemblyListingArray(builder, referencedAssembliesMethod, assembly.Type, builder.ReferencedAssemblies);
9595
}
9696

9797
private void CreateAssemblyListingArray(Builder builder, Method method, BuilderType assemblyType, IEnumerable<AssemblyDefinition> assembliesToList)

Fody/Cauldron.Interception.Fody/ModuleWeaver_Scripting.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ public void ExecuteInterceptionScripts(Builder builder)
7676
{
7777
this.Log(LogTypes.Info, ">> Executing custom interceptors in: " + scriptBinary.Name);
7878
var config = scriptBinary.Type.GetProperty("Config", BindingFlags.Static | BindingFlags.Public);
79+
var projectDirectoryPath = scriptBinary.Type.GetProperty("ProjectDirectoryPath", BindingFlags.Static | BindingFlags.Public);
80+
var solutionDirectoryPath = scriptBinary.Type.GetProperty("SolutionDirectoryPath", BindingFlags.Static | BindingFlags.Public);
7981

80-
if (config != null)
81-
config.SetValue(null, this.Config);
82+
if (config != null) config.SetValue(null, this.Config);
83+
if (projectDirectoryPath != null) projectDirectoryPath.SetValue(null, this.ProjectDirectoryPath);
84+
if (solutionDirectoryPath != null) solutionDirectoryPath.SetValue(null, this.SolutionDirectoryPath);
8285

8386
foreach (var method in scriptBinary.Implement)
8487
{

Fody/Cauldron.Interception.Fody/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
//
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
34-
[assembly: AssemblyVersion("3.2.0.0")]
35-
[assembly: AssemblyFileVersion("3.2.0.0")]
34+
[assembly: AssemblyVersion("3.2.0.2")]
35+
[assembly: AssemblyFileVersion("3.2.0.2")]

Fody/Cauldron.WPF.Interceptors/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
3333
// indem Sie "*" wie unten gezeigt eingeben:
3434
// "3.0.0.8")]
35-
[assembly: AssemblyVersion("3.2.0.0")]
36-
[assembly: AssemblyFileVersion("3.2.0.0")]
35+
[assembly: AssemblyVersion("3.2.0.2")]
36+
[assembly: AssemblyFileVersion("3.2.0.2")]

0 commit comments

Comments
 (0)