﻿// Decompiled with JetBrains decompiler
// Type: MongoDB.Bson.Serialization.Options.BsonBaseSerializationOptions
// Assembly: MongoDB.Bson, Version=1.6.1.21837, Culture=neutral, PublicKeyToken=f686731cfb9cc103
// MVID: 93880221-3735-46FB-8891-84D897158E28
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\MongoDB.Bson.dll

using MongoDB.Bson;
using MongoDB.Bson.Serialization;
using System;

namespace MongoDB.Bson.Serialization.Options
{
  public abstract class BsonBaseSerializationOptions : IBsonSerializationOptions
  {
    private bool _isFrozen;

    public bool IsFrozen
    {
      get
      {
        return this._isFrozen;
      }
    }

    public virtual void ApplyAttribute(IBsonSerializer serializer, Attribute attribute)
    {
      throw new NotSupportedException();
    }

    public virtual IBsonSerializationOptions Clone()
    {
      throw new NotSupportedException();
    }

    public virtual IBsonSerializationOptions Freeze()
    {
      if (!this._isFrozen)
        this._isFrozen = true;
      return (IBsonSerializationOptions) this;
    }

    protected void EnsureNotFrozen()
    {
      if (this._isFrozen)
        throw new InvalidOperationException(string.Format("{0} is frozen.", (object) BsonUtils.GetFriendlyTypeName(this.GetType())));
    }
  }
}
