private NewStreamMessage(NativeNewStreamMessage nativeMsg) { Tag = nativeMsg.Tag; StreamID = nativeMsg.StreamID; Name = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.NamePtr); Url = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.UrlPtr); }
private ErrorMessage(NativeErrorMessage nativeMsg) { Tag = nativeMsg.Tag; Message = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.MessagePtr); Function = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.FunctionPtr); File = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.FilePtr); LineNumber = nativeMsg.LineNumber; }
private DjvuFileInfo(NativeFileInfo nativeData) { Type = nativeData.Type; PageNumber = nativeData.PageNumber; Size = nativeData.Size; ID = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeData.IDPtr); Name = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeData.NamePtr); Title = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeData.TitlePtr); }
public static ICustomMarshaler GetInstance(string cookie) { // First should be most probable code exec path if (_Instance != null) { return(_Instance); } else { _Instance = new UTF8StringMarshaler(); _Instance.Cookie = cookie; return(_Instance); } }
private InfoMessage(NativeInfoMessage nativeMsg) { Tag = nativeMsg.Tag; Message = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.MessagePtr); }
private ChunkMessage(NativeChunkMessage nativeMsg) { Any = nativeMsg.Any; ChunkID = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.ChunkIdPtr); }