예제 #1
0
 private NewStreamMessage(NativeNewStreamMessage nativeMsg)
 {
     Tag      = nativeMsg.Tag;
     StreamID = nativeMsg.StreamID;
     Name     = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.NamePtr);
     Url      = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.UrlPtr);
 }
예제 #2
0
 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;
 }
예제 #3
0
 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);
 }
예제 #4
0
 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);
     }
 }
예제 #5
0
 private InfoMessage(NativeInfoMessage nativeMsg)
 {
     Tag     = nativeMsg.Tag;
     Message = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.MessagePtr);
 }
예제 #6
0
 private ChunkMessage(NativeChunkMessage nativeMsg)
 {
     Any     = nativeMsg.Any;
     ChunkID = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.ChunkIdPtr);
 }