示例#1
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            if (Metadata != null)
            {
                if (Metadata.GameInfo != null)
                {
                    Metadata.GameInfo.EndTimeUtc = DateTime.UtcNow;
                }
                Metadata.Write(writer);
            }

            preStartBuffer?.Dispose();
            writer.Close();
        }
示例#2
0
        protected void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                if (Metadata != null)
                {
                    if (Metadata.GameInfo != null)
                    {
                        Metadata.GameInfo.EndTimeUtc = DateTime.UtcNow;
                    }
                    Metadata.Write(writer);
                }
                writer.Close();
                inner.Dispose();
            }

            disposed = true;
        }