// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Collections.Generic; namespace ICSharpCode.SharpDevelop.Dom { public class DefaultUsingScope : AbstractFreezable, IUsingScope { DomRegion region; IUsingScope parent; IList usings; IList childScopes; string namespaceName = ""; protected override void FreezeInternal() { base.FreezeInternal(); usings = FreezeList(usings); childScopes = FreezeList(childScopes); } public DomRegion Region { get { return region; } set { CheckBeforeMutation(); region = value; } } public IUsingScope Parent { get { return parent; } set { CheckBeforeMutation(); parent = value; } } public virtual IList Usings { get { if (usings == null) usings = new List(); return usings; } } public virtual IList ChildScopes { get { if (childScopes == null) childScopes = new List(); return childScopes; } } public string NamespaceName { get { return namespaceName; } set { if (value == null) throw new ArgumentNullException("NamespaceName"); CheckBeforeMutation(); namespaceName = value; } } } }