﻿// Decompiled with JetBrains decompiler
// Type: System.Net.Configuration.Ipv6Element
// Assembly: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 5ABD58FD-DF31-44FD-A492-63F2B47CC9AF
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll

using System.Configuration;
using System.Runtime;

namespace System.Net.Configuration
{
  /// <summary>
  /// Determines whether Internet Protocol version 6 is enabled on the local computer. This class cannot be inherited.
  /// </summary>
  public sealed class Ipv6Element : ConfigurationElement
  {
    private ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
    private readonly ConfigurationProperty enabled = new ConfigurationProperty("enabled", typeof (bool), (object) false, ConfigurationPropertyOptions.None);

    protected override ConfigurationPropertyCollection Properties
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.properties;
      }
    }

    /// <summary>
    /// Gets or sets a Boolean value that indicates whether Internet Protocol version 6 is enabled on the local computer.
    /// </summary>
    /// 
    /// <returns>
    /// true if IPv6 is enabled; otherwise, false.
    /// </returns>
    [ConfigurationProperty("enabled", DefaultValue = false)]
    public bool Enabled
    {
      get
      {
        return (bool) this[this.enabled];
      }
      set
      {
        this[this.enabled] = (object) (bool) (value ? 1 : 0);
      }
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Net.Configuration.Ipv6Element"/> class.
    /// </summary>
    public Ipv6Element()
    {
      this.properties.Add(this.enabled);
    }
  }
}
