Getting System.ArgumentException calling to Serialize
See original GitHub issueI’m getting this:
You can reproduce it with this zipped solution. Run XamlLoadTest and you will see. OmniXaml.zip
{System.ArgumentException: Incorrect number of arguments supplied for call to method ‘Void Add(System.Object, System.Object)’ Parameter name: method at System.Dynamic.Utils.ExpressionUtils.ValidateArgumentCount(MethodBase method, ExpressionType nodeKind, Int32 count, ParameterInfo[] pis) at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method) at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable
1 arguments) at ExtendedXmlSerialization.Cache.ObjectAccessors.CreateMethodAddToDictionary(Type type) at ExtendedXmlSerialization.Cache.TypeDefinition..ctor(Type type) at ExtendedXmlSerialization.Cache.TypeDefinitionCache.<>c.<GetDefinition>b__3_0(Type t) at System.Runtime.CompilerServices.ConditionalWeakTable
2.GetValue(TKey key, CreateValueCallback createValueCallback) at ExtendedXmlSerialization.Cache.PropertieDefinition…ctor(Type type, PropertyInfo propertyInfo, String name) at ExtendedXmlSerialization.Cache.TypeDefinition.GetPropertieToSerialze() at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue() at ExtendedXmlSerialization.ExtendedXmlSerializer.WriteXml(XmlWriter writer, Object o, TypeDefinition type, String name, Boolean writeReservedObject, Boolean forceSaveType) at ExtendedXmlSerialization.ExtendedXmlSerializer.Serialize(Object o) at XamlLoadTest.Program.ShowResult(Object instance) in F:\Source\Repos\OmniGUI\OmniXAML\XamlLoadTest\Program.cs:line 29 at XamlLoadTest.Program.Main(String[] args) in F:\Source\Repos\OmniGUI\OmniXAML\XamlLoadTest\Program.cs:line 23} System.ArgumentException
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
You can use:
new ConfigurationContainer().UseOptimizedNamespaces().Create();
If you want to optimize namespaces.Wow, it works as expected! It looks like I’m not too used to dealing with buffered things 😃 I get the XML now! Look the output at the bottom of the snapshot.
It seems you’re doing a GREAT job with this ExtendedXmlSerializer!
Big thanks!
BTW, if you want to get in touch, just look for my nickname in Skype. See you, Mike! 😄