Source/NFX/Serialization/SerializationUtils.cs
/// <summary>
/// Calls method in the list that was returned by a call to FindSerializationAttributedMethods
/// </summary>
/// <param name="methods">list that was returned by a call to FindSerializationAttributedMethods</param>
/// <param name="instance">Instance to invoke mathods on</param>
/// <param name="streamingContext">Streaming Context</param>
Calls method in the list that was returned by a call to FindSerializationAttributedMethods
Calls method in the list that was returned by a call to FindSerializationAttributedMethods
public static void InvokeSerializationAttributedMethods(List<MethodInfo> methods, object instance, StreamingContext streamingContext)
        {
            if (instance==null) return;
            for(var i=0; i<methods.Count; i++)
             try
             {
              methods[i].Invoke(instance, new object[] { streamingContext });
             }
             catch(TargetInvocationException ie)
             {  
                if (ie.InnerException!=null) throw ie.InnerException;
                throw;
             }
        }
public static void InvokeSerializationAttributedMethods ( List < MethodInfo > methods , object instance , StreamingContext streamingContext ) { if ( instance == null ) return ; for ( var i = 0 ; i < methods . Count ; i ++ ) try { methods [ i ] . Invoke ( instance , new object [ ] { streamingContext } ) ; } catch ( TargetInvocationException ie ) { if ( ie . InnerException != null ) throw ie . InnerException ; throw ; } }
Calls method in the list that was returned by a call to FindSerializationAttributedMethods
Calls method in the list that was returned by a call to FindSerializationAttributedMethods
//20131219 DKh
methods
List<MethodInfo>
list that was returned by a call to FindSerializationAttributedMethods
list that was returned by a call to FindSerializationAttributedMethods
instance
object
Instance to invoke mathods on
Instance to invoke mathods on
streamingContext
StreamingContext
None