public SystemMessageEnumerator CreateEnumerator(IMessageEnumerator ime)
        {
            Type[] types =
            {
                typeof(IMessageEnumerator), typeof(SystemIMessageFormatter)
            };

            ConstructorInfo ci = typeof(SystemMessageEnumerator).GetConstructor(
                BindingFlags.NonPublic | BindingFlags.Instance,
                Type.DefaultBinder, types, new ParameterModifier[0]);

            if (ci == null)
            {
                throw new Exception("ConstructorInfo is null");
            }

            return((SystemMessageEnumerator)ci.Invoke(new object[] { ime, null }));
        }
Exemple #2
0
 internal MessageEnumerator(IMessageEnumerator delegateEnumerator, IMessageFormatter formatter)
 {
     this.delegateEnumerator = delegateEnumerator;
     this.formatter          = formatter;
 }
		public SystemMessageEnumerator CreateEnumerator (IMessageEnumerator ime)
		{
            Type[] types = { 
                typeof (IMessageEnumerator), typeof (SystemIMessageFormatter)
            };
                
            ConstructorInfo ci = typeof (SystemMessageEnumerator).GetConstructor (
                BindingFlags.NonPublic | BindingFlags.Instance, 
                Type.DefaultBinder, types, new ParameterModifier[0]);
                
            if (ci == null)
                throw new Exception ("ConstructorInfo is null");
            
            return (SystemMessageEnumerator) ci.Invoke (new object[] { ime, null });
		}
Exemple #4
0
		internal MessageEnumerator (IMessageEnumerator delegateEnumerator, IMessageFormatter formatter)
		{
			this.delegateEnumerator = delegateEnumerator;
			this.formatter = formatter;
		}