internal static DarkRiftReader Create(IMessageBuffer buffer) { DarkRiftReader reader = ObjectCache.GetReader(); reader.isCurrentlyLoungingInAPool = false; reader.buffer = buffer; reader.Encoding = Encoding.Unicode; // TODO DR3 Default to UTF-8 reader.Position = 0; return(reader); }
public static void ReturnReader(DarkRiftReader reader) { if (!initialized) { ThreadInitialize(); } #if DEBUG ObjectCacheTestHelper.DarkRiftReaderWasReturned(); #endif readerPool.ReturnInstance(reader); }
/// <summary> /// Creates a new DeserializeEvent. /// </summary> /// <param name="reader">The reader to deserialize from.</param> public DeserializeEvent(DarkRiftReader reader) { Reader = reader; }