public static object Load(ReaderSites /*!*/ sites, RubyScope /*!*/ scope, RubyModule /*!*/ self, [NotNull] MutableString /*!*/ source, [Optional] Proc proc) { BinaryReader reader = new BinaryReader(new MemoryStream(source.ConvertToBytes())); MarshalReader loader = new MarshalReader(sites, reader, scope.GlobalScope, proc); return(loader.Load()); }
public static object Load(ReaderSites /*!*/ sites, RubyScope /*!*/ scope, RubyModule /*!*/ self, [NotNull] RubyIO /*!*/ source, [Optional] Proc proc) { BinaryReader reader = source.GetBinaryReader(); MarshalReader loader = new MarshalReader(sites, reader, scope.GlobalScope, proc); return(loader.Load()); }
public static object Load(RubyScope /*!*/ scope, RubyModule /*!*/ self, object source, [Optional] Proc proc) { Stream stream = null; if (source != null) { stream = new IOWrapper(self.Context, source, FileAccess.Read); } if (stream == null || !stream.CanRead) { throw RubyExceptions.CreateTypeError("instance of IO needed"); } BinaryReader reader = new BinaryReader(stream); MarshalReader loader = new MarshalReader(reader, scope.RubyContext, scope.GlobalScope, proc); return(loader.Load()); }
public static object GetObject(IEnumerator <byte> bytes) { MarshalReader mr = new MarshalReader(bytes); return(mr.ReadObject()); }
private static object BytesToObject(IEnumerator <byte> bytes) { MarshalReader mr = new MarshalReader(bytes); return(mr.ReadObject()); }
public static object Load(ReaderSites/*!*/ sites, RespondToStorage/*!*/ respondToStorage, RubyScope/*!*/ scope, RubyModule/*!*/ self, object source, [Optional]Proc proc) { Stream stream = null; if (source != null) { stream = RubyIOOps.CreateIOWrapper(respondToStorage, source, FileAccess.Read); } if (stream == null || !stream.CanRead) { throw RubyExceptions.CreateTypeError("instance of IO needed"); } BinaryReader reader = new BinaryReader(stream); MarshalReader loader = new MarshalReader(sites, reader, scope.GlobalScope, proc); return loader.Load(); }
public static object Load(ReaderSites/*!*/ sites, RubyScope/*!*/ scope, RubyModule/*!*/ self, [NotNull]RubyIO/*!*/ source, [Optional]Proc proc) { BinaryReader reader = source.GetBinaryReader(); MarshalReader loader = new MarshalReader(sites, reader, scope.GlobalScope, proc); return loader.Load(); }
public static object Load(ReaderSites/*!*/ sites, RubyScope/*!*/ scope, RubyModule/*!*/ self, [NotNull]MutableString/*!*/ source, [Optional]Proc proc) { BinaryReader reader = new BinaryReader(new MemoryStream(source.ConvertToBytes())); MarshalReader loader = new MarshalReader(sites, reader, scope.GlobalScope, proc); return loader.Load(); }
public static object GetObject (IEnumerator<byte> bytes) { MarshalReader mr = new MarshalReader (bytes); return mr.ReadObject (); }
private static object BytesToObject(IEnumerator<byte> bytes) { MarshalReader mr = new MarshalReader(bytes); return mr.ReadObject(); }
static object BytesToObject(byte[] bytes) { MarshalReader mr = new MarshalReader(bytes); return mr.ReadObject(); }
static object BytesToObject(byte[] bytes) { MarshalReader mr = new MarshalReader(bytes); return(mr.ReadObject()); }