Skip to content

Instantly share code, notes, and snippets.

@lbargaoanu
Last active July 13, 2016 12:39
Show Gist options
  • Save lbargaoanu/d90c736d3c7317f0cc0bc45983cce3f6 to your computer and use it in GitHub Desktop.
Save lbargaoanu/d90c736d3c7317f0cc0bc45983cce3f6 to your computer and use it in GitHub Desktop.
.Lambda #Lambda1<System.Func`4[System.Collections.Generic.List`1[Benchmarks.Models.Test],System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel],AutoMapper.ResolutionContext,System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel]]>(
System.Collections.Generic.List`1[Benchmarks.Models.Test] $source,
System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel] $destination,
AutoMapper.ResolutionContext $context) {
.Try {
.If ($source == null) {
.If ($destination != null) {
$destination
} .Else {
.New System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel]()
}
} .Else {
.Block(System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel] $d) {
$d = $destination;
.If ($destination != null) {
.Call $destination.Clear()
} .Else {
$d = .If ($destination != null) {
$destination
} .Else {
.New System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel]()
}
};
.Block(System.Collections.Generic.List`1+Enumerator[Benchmarks.Models.Test] $enumerator) {
$enumerator = .Call $source.GetEnumerator();
.Loop {
.If (.Call $enumerator.MoveNext() == True) {
.Block(Benchmarks.Models.Test $item) {
$item = $enumerator.Current;
.Call $d.Add(.Call $context.Map(
$item,
.Default(Benchmarks.ViewModels.TestViewModel)))
}
} .Else {
.Break LoopBreak { }
}
}
.LabelTarget LoopBreak:
};
$d
}
}
} .Catch (System.Exception $ex) {
.Block() {
.Throw .New AutoMapper.AutoMapperMappingException(
"Error mapping types.",
$ex,
.Constant<AutoMapper.TypePair>(AutoMapper.TypePair));
.Default(System.Collections.Generic.List`1[Benchmarks.ViewModels.TestViewModel])
}
}
}
An unhandled exception of type 'System.ArgumentOutOfRangeException' was thrown by the custom visualizer component in the process being debugged.
Specified argument was out of the range of valid values.
Parameter name: startIndex
at System.String.Insert(Int32 startIndex, String value)
at AgileObjects.ReadableExpressions.Extensions.TypeExtensions.GetFriendlyName(Type type)
at AgileObjects.ReadableExpressions.Translators.BlockExpressionTranslator.<>c.<GetVariableDeclarations>b__2_1(IGrouping`2 vGrp)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__58`1.MoveNext()
at System.String.Join(String separator, IEnumerable`1 values)
at AgileObjects.ReadableExpressions.Translators.BlockExpressionTranslator.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.ExpressionTranslatorRegistry.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.TranslationContext.GetTranslation(Expression expression)
at AgileObjects.ReadableExpressions.Translators.BlockExpressionTranslator.GetTerminatedStatementOrNull(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.BlockExpressionTranslator.<>c__DisplayClass3_0.<GetBlockLines>b__1(Expression exp)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at AgileObjects.ReadableExpressions.Translators.BlockExpressionTranslator.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.ExpressionTranslatorRegistry.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.TranslationContext.GetTranslation(Expression expression)
at AgileObjects.ReadableExpressions.Translators.ExpressionTranslatorBase.TranslateBlock(BlockExpression bodyBlock, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.ExpressionTranslatorBase.GetTranslatedExpressionBody(Expression body, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.ConditionalExpressionTranslator.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.ExpressionTranslatorRegistry.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.TranslationContext.GetTranslation(Expression expression)
at AgileObjects.ReadableExpressions.Translators.ExpressionTranslatorBase.TranslateSingle(Expression bodySingle, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.ExpressionTranslatorBase.GetTranslatedExpressionBody(Expression body, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.TryCatchExpressionTranslator.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.ExpressionTranslatorRegistry.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.TranslationContext.GetTranslation(Expression expression)
at AgileObjects.ReadableExpressions.Translators.ExpressionTranslatorBase.TranslateSingle(Expression bodySingle, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.ExpressionTranslatorBase.GetTranslatedExpressionBody(Expression body, TranslationContext context)
at AgileObjects.ReadableExpressions.Translators.LambdaExpressionTranslator.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.ExpressionTranslatorRegistry.Translate(Expression expression, TranslationContext context)
at AgileObjects.ReadableExpressions.ExpressionTranslatorRegistry.Translate(Expression expression)
at AgileObjects.ReadableExpressions.ExpressionExtensions.ToReadableString(Expression expression)
at AgileObjects.ReadableExpressions.Visualizers.Core.ExpressionVisualizerObjectSource.GetData(Object target, Stream outgoingData, Action`2 serializer)
at AgileObjects.ReadableExpressions.Visualizers.Vs14ExpressionVisualizerObjectSource.GetData(Object target, Stream outgoingData)
at Microsoft.VisualStudio.DebuggerVisualizers.ClrCustomVisualizers.ClrCustomVisualizerDebuggeeHost.GetData(Object visualizedObject)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment