Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / CodeDOM / CodeNamespace.cs / 1 / CodeNamespace.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.Serialization; using System.Runtime.InteropServices; ////// [ ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable, ] public class CodeNamespace: CodeObject { private string name; private CodeNamespaceImportCollection imports = new CodeNamespaceImportCollection(); private CodeCommentStatementCollection comments = new CodeCommentStatementCollection(); private CodeTypeDeclarationCollection classes = new CodeTypeDeclarationCollection(); private CodeNamespaceCollection namespaces = new CodeNamespaceCollection(); private int populated = 0x0; private const int ImportsCollection = 0x1; private const int CommentsCollection = 0x2; private const int TypesCollection = 0x4; #if CODEDOM_NESTED_NAMESPACES private const int NamespacesCollection = 0x8; #endif ////// Represents a /// namespace declaration. /// ////// public event EventHandler PopulateComments; ////// An event that will be fired the first time the Comments Collection is accessed. /// ////// public event EventHandler PopulateImports; #if CODEDOM_NESTED_NAMESPACES ////// An event that will be fired the first time the Imports Collection is accessed. /// ////// public event EventHandler PopulateNamespaces; #endif ////// An event that will be fired the first time the Namespaces Collection is accessed. /// ////// public event EventHandler PopulateTypes; ////// An event that will be fired the first time the Types Collection is accessed. /// ////// public CodeNamespace() { } ////// Initializes a new instance of ///. /// /// public CodeNamespace(string name) { Name = name; } private CodeNamespace(SerializationInfo info, StreamingContext context) { } ////// Initializes a new instance of ///using the specified name. /// /// public CodeTypeDeclarationCollection Types { get { if (0 == (populated & TypesCollection)) { populated |= TypesCollection; if (PopulateTypes != null) PopulateTypes(this, EventArgs.Empty); } return classes; } } ////// Gets or sets the collection of classes. /// ////// public CodeNamespaceImportCollection Imports { get { if (0 == (populated & ImportsCollection)) { populated |= ImportsCollection; if (PopulateImports != null) PopulateImports(this, EventArgs.Empty); } return imports; } } ////// Gets or sets the collection of namespace imports used by the represented /// namespace. /// ////// public string Name { get { return (name == null) ? string.Empty : name; } set { name = value; } } #if CODEDOM_NESTED_NAMESPACES ////// Gets or sets the name of the namespace. /// ////// public CodeNamespaceCollection Namespaces { get { if (0 == (populated & NamespacesCollection)) { populated |= NamespacesCollection; if (PopulateNamespaces != null) PopulateNamespaces(this, EventArgs.Empty); } return namespaces; } } #endif ////// Gets or sets the collection of Namespaces. /// ////// public CodeCommentStatementCollection Comments { get { if (0 == (populated & CommentsCollection)) { populated |= CommentsCollection; if (PopulateComments != null) PopulateComments(this, EventArgs.Empty); } return comments; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Gets or sets the member comment collection members. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.Serialization; using System.Runtime.InteropServices; ////// [ ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable, ] public class CodeNamespace: CodeObject { private string name; private CodeNamespaceImportCollection imports = new CodeNamespaceImportCollection(); private CodeCommentStatementCollection comments = new CodeCommentStatementCollection(); private CodeTypeDeclarationCollection classes = new CodeTypeDeclarationCollection(); private CodeNamespaceCollection namespaces = new CodeNamespaceCollection(); private int populated = 0x0; private const int ImportsCollection = 0x1; private const int CommentsCollection = 0x2; private const int TypesCollection = 0x4; #if CODEDOM_NESTED_NAMESPACES private const int NamespacesCollection = 0x8; #endif ////// Represents a /// namespace declaration. /// ////// public event EventHandler PopulateComments; ////// An event that will be fired the first time the Comments Collection is accessed. /// ////// public event EventHandler PopulateImports; #if CODEDOM_NESTED_NAMESPACES ////// An event that will be fired the first time the Imports Collection is accessed. /// ////// public event EventHandler PopulateNamespaces; #endif ////// An event that will be fired the first time the Namespaces Collection is accessed. /// ////// public event EventHandler PopulateTypes; ////// An event that will be fired the first time the Types Collection is accessed. /// ////// public CodeNamespace() { } ////// Initializes a new instance of ///. /// /// public CodeNamespace(string name) { Name = name; } private CodeNamespace(SerializationInfo info, StreamingContext context) { } ////// Initializes a new instance of ///using the specified name. /// /// public CodeTypeDeclarationCollection Types { get { if (0 == (populated & TypesCollection)) { populated |= TypesCollection; if (PopulateTypes != null) PopulateTypes(this, EventArgs.Empty); } return classes; } } ////// Gets or sets the collection of classes. /// ////// public CodeNamespaceImportCollection Imports { get { if (0 == (populated & ImportsCollection)) { populated |= ImportsCollection; if (PopulateImports != null) PopulateImports(this, EventArgs.Empty); } return imports; } } ////// Gets or sets the collection of namespace imports used by the represented /// namespace. /// ////// public string Name { get { return (name == null) ? string.Empty : name; } set { name = value; } } #if CODEDOM_NESTED_NAMESPACES ////// Gets or sets the name of the namespace. /// ////// public CodeNamespaceCollection Namespaces { get { if (0 == (populated & NamespacesCollection)) { populated |= NamespacesCollection; if (PopulateNamespaces != null) PopulateNamespaces(this, EventArgs.Empty); } return namespaces; } } #endif ////// Gets or sets the collection of Namespaces. /// ////// public CodeCommentStatementCollection Comments { get { if (0 == (populated & CommentsCollection)) { populated |= CommentsCollection; if (PopulateComments != null) PopulateComments(this, EventArgs.Empty); } return comments; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Gets or sets the member comment collection members. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- altserialization.cs
- documentation.cs
- AnimationLayer.cs
- CopyOfAction.cs
- FormViewModeEventArgs.cs
- ValueSerializer.cs
- GPStream.cs
- NamedPipeAppDomainProtocolHandler.cs
- ItemContainerGenerator.cs
- HeaderElement.cs
- XmlQuerySequence.cs
- EtwProvider.cs
- HttpApplication.cs
- __Filters.cs
- EmptyEnumerator.cs
- Stackframe.cs
- XmlValidatingReader.cs
- ConfigurationStrings.cs
- TraceShell.cs
- BinaryMethodMessage.cs
- SQLSingle.cs
- PropertyGridCommands.cs
- TreeView.cs
- HasCopySemanticsAttribute.cs
- MILUtilities.cs
- WebPartTransformer.cs
- ConnectionPointCookie.cs
- RemoteAsymmetricSignatureFormatter.cs
- KeyValueConfigurationCollection.cs
- MatrixTransform3D.cs
- GraphicsPathIterator.cs
- OpenTypeLayout.cs
- TailPinnedEventArgs.cs
- SuppressMergeCheckAttribute.cs
- ConfigsHelper.cs
- VisualStateGroup.cs
- WebPageTraceListener.cs
- EntityCommandCompilationException.cs
- HtmlHistory.cs
- CompilerErrorCollection.cs
- BamlResourceSerializer.cs
- ToolboxDataAttribute.cs
- XMLSchema.cs
- XPathBinder.cs
- ResourceReferenceExpression.cs
- UIElementParagraph.cs
- JulianCalendar.cs
- LinqExpressionNormalizer.cs
- X509CertificateClaimSet.cs
- AlternateViewCollection.cs
- ItemDragEvent.cs
- CategoryAttribute.cs
- ScriptResourceDefinition.cs
- OracleDateTime.cs
- NavigationProperty.cs
- MailWebEventProvider.cs
- XmlIlTypeHelper.cs
- ProcessDesigner.cs
- DateTimeEditor.cs
- GridViewSortEventArgs.cs
- ThousandthOfEmRealPoints.cs
- CompilerGeneratedAttribute.cs
- StreamInfo.cs
- ReadOnlyDictionary.cs
- ConfigurationLocationCollection.cs
- IdentityNotMappedException.cs
- CallbackCorrelationInitializer.cs
- ApplicationContext.cs
- CodeNamespaceCollection.cs
- InputLanguageEventArgs.cs
- SharedUtils.cs
- TypeConverterHelper.cs
- Attachment.cs
- formatter.cs
- SafeCoTaskMem.cs
- DesignerWebPartChrome.cs
- SharedPersonalizationStateInfo.cs
- DialogResultConverter.cs
- QilInvokeEarlyBound.cs
- XPathItem.cs
- NestPullup.cs
- WorkflowOperationInvoker.cs
- XmlUrlEditor.cs
- OutOfProcStateClientManager.cs
- ObjectTypeMapping.cs
- AppSecurityManager.cs
- HttpSessionStateWrapper.cs
- CompensatableTransactionScopeActivity.cs
- Wizard.cs
- TdsRecordBufferSetter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- MutexSecurity.cs
- ObjectViewFactory.cs
- WindowsTreeView.cs
- XmlReaderSettings.cs
- SmtpTransport.cs
- MatrixConverter.cs
- StreamBodyWriter.cs
- PassportAuthenticationEventArgs.cs
- Int16Converter.cs