public static MissingMethodException/*!*/ Factory(
RubyClass/*!*/ self,
[DefaultParameterValue(null)]object message,
[DefaultParameterValue(null)]object name,
[DefaultParameterValue(null)]object args) {
MissingMethodException result = new MissingMethodException(RubyExceptionData.GetClrMessage(self, message ?? "NoMethodError"));
RubyExceptionData.InitializeException(result, message);
// Exception.Data requires the value to be Serializable. We workaround this using an array
// of size 1 since System.Array is serializable. This will allow the exception to be marshalled.
// If the value cannot actually be marshalled, it will fail only if the value is later accessed.
#if SILVERLIGHT
result.Data[typeof(NoMethodErrorOps)] = new object[1] { args };
#else
result.Data[typeof(NoMethodErrorOps)] = new ObjectHandle[1] { new ObjectHandle(args) };
#endif
return result;
}