Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Reflection / Emit / ModuleBuilderData.cs / 5 / ModuleBuilderData.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// namespace System.Reflection.Emit { using System; using System.Reflection; using System.IO; using System.Globalization; // This is a package private class. This class hold all of the managed // data member for ModuleBuilder. Note that what ever data members added to // this class cannot be accessed from the EE. [Serializable()] internal class ModuleBuilderData { internal ModuleBuilderData(ModuleBuilder module, String strModuleName, String strFileName) { Init(module, strModuleName, strFileName); } internal virtual void Init(ModuleBuilder module, String strModuleName, String strFileName) { m_fGlobalBeenCreated = false; m_fHasGlobal = false; m_globalTypeBuilder = new TypeBuilder(module); m_module = module; m_strModuleName = strModuleName; m_tkFile = 0; m_isSaved = false; m_embeddedRes = null; m_strResourceFileName = null; m_resourceBytes = null; if (strFileName == null) { // fake a transient module file name m_strFileName = strModuleName; m_isTransient = true; } else { String strExtension = Path.GetExtension(strFileName); if (strExtension == null || strExtension == String.Empty) { // This is required by our loader. It cannot load module file that does not have file extension. throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_NoModuleFileExtension"), strFileName)); } m_strFileName = strFileName; m_isTransient = false; } m_module.InternalSetModuleProps(m_strModuleName); } internal virtual bool IsTransient() { return m_isTransient; } internal String m_strModuleName; // scope name (can be different from file name) internal String m_strFileName; internal bool m_fGlobalBeenCreated; internal bool m_fHasGlobal; [NonSerialized] internal TypeBuilder m_globalTypeBuilder; [NonSerialized] internal ModuleBuilder m_module; internal int m_tkFile; // this is the file token for this module builder internal bool m_isSaved; [NonSerialized] internal ResWriterData m_embeddedRes; internal const String MULTI_BYTE_VALUE_CLASS = "$ArrayType$"; internal bool m_isTransient; internal String m_strResourceFileName; internal byte[] m_resourceBytes; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// namespace System.Reflection.Emit { using System; using System.Reflection; using System.IO; using System.Globalization; // This is a package private class. This class hold all of the managed // data member for ModuleBuilder. Note that what ever data members added to // this class cannot be accessed from the EE. [Serializable()] internal class ModuleBuilderData { internal ModuleBuilderData(ModuleBuilder module, String strModuleName, String strFileName) { Init(module, strModuleName, strFileName); } internal virtual void Init(ModuleBuilder module, String strModuleName, String strFileName) { m_fGlobalBeenCreated = false; m_fHasGlobal = false; m_globalTypeBuilder = new TypeBuilder(module); m_module = module; m_strModuleName = strModuleName; m_tkFile = 0; m_isSaved = false; m_embeddedRes = null; m_strResourceFileName = null; m_resourceBytes = null; if (strFileName == null) { // fake a transient module file name m_strFileName = strModuleName; m_isTransient = true; } else { String strExtension = Path.GetExtension(strFileName); if (strExtension == null || strExtension == String.Empty) { // This is required by our loader. It cannot load module file that does not have file extension. throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_NoModuleFileExtension"), strFileName)); } m_strFileName = strFileName; m_isTransient = false; } m_module.InternalSetModuleProps(m_strModuleName); } internal virtual bool IsTransient() { return m_isTransient; } internal String m_strModuleName; // scope name (can be different from file name) internal String m_strFileName; internal bool m_fGlobalBeenCreated; internal bool m_fHasGlobal; [NonSerialized] internal TypeBuilder m_globalTypeBuilder; [NonSerialized] internal ModuleBuilder m_module; internal int m_tkFile; // this is the file token for this module builder internal bool m_isSaved; [NonSerialized] internal ResWriterData m_embeddedRes; internal const String MULTI_BYTE_VALUE_CLASS = "$ArrayType$"; internal bool m_isTransient; internal String m_strResourceFileName; internal byte[] m_resourceBytes; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CustomMenuItemCollection.cs
- PackageDigitalSignature.cs
- WebPartRestoreVerb.cs
- PropertyPushdownHelper.cs
- RoutedEventHandlerInfo.cs
- Base64Encoder.cs
- ZipIOBlockManager.cs
- ExtensionFile.cs
- SettingsBindableAttribute.cs
- _UncName.cs
- Highlights.cs
- XamlTypeWithExplicitNamespace.cs
- EncoderReplacementFallback.cs
- SelectionRange.cs
- HttpRuntime.cs
- ListViewEditEventArgs.cs
- TerminatorSinks.cs
- COM2Enum.cs
- RequiredFieldValidator.cs
- WebZone.cs
- SystemUnicastIPAddressInformation.cs
- BufferBuilder.cs
- SHA512Managed.cs
- UrlAuthFailedErrorFormatter.cs
- TitleStyle.cs
- SHA384Managed.cs
- EntityViewContainer.cs
- FixedHighlight.cs
- DocumentViewer.cs
- PropertyInformation.cs
- HtmlTernaryTree.cs
- VectorValueSerializer.cs
- NonBatchDirectoryCompiler.cs
- MergeFilterQuery.cs
- GroupItem.cs
- ColorTransform.cs
- Parser.cs
- HtmlImage.cs
- OdbcConnectionFactory.cs
- ExportOptions.cs
- WaitHandle.cs
- BamlRecords.cs
- EventLogger.cs
- BigInt.cs
- CollectionViewProxy.cs
- FormsAuthenticationCredentials.cs
- WmlCalendarAdapter.cs
- TabPage.cs
- OdbcTransaction.cs
- System.Data_BID.cs
- ReferenceTypeElement.cs
- HtmlContainerControl.cs
- StylusButtonCollection.cs
- XsltLoader.cs
- StringFunctions.cs
- CrossSiteScriptingValidation.cs
- StreamInfo.cs
- MediaTimeline.cs
- KeyPressEvent.cs
- JavaScriptSerializer.cs
- TreeViewCancelEvent.cs
- _emptywebproxy.cs
- TransactionFlowAttribute.cs
- FrameworkRichTextComposition.cs
- PaginationProgressEventArgs.cs
- StylusPlugin.cs
- HttpsHostedTransportConfiguration.cs
- OracleFactory.cs
- GeneralTransformGroup.cs
- DocumentPageTextView.cs
- AjaxFrameworkAssemblyAttribute.cs
- CodeRemoveEventStatement.cs
- Emitter.cs
- TransactionScopeDesigner.cs
- CommonDialog.cs
- TransformPatternIdentifiers.cs
- ButtonBaseAutomationPeer.cs
- HealthMonitoringSection.cs
- CreateDataSourceDialog.cs
- MailSettingsSection.cs
- DesignerAdapterUtil.cs
- TemplateBindingExtensionConverter.cs
- SmiEventSink.cs
- VectorKeyFrameCollection.cs
- TextBoxBase.cs
- ContextBase.cs
- NativeMethods.cs
- ConfigurationSectionGroupCollection.cs
- PassportAuthentication.cs
- AnnotationResourceCollection.cs
- StandardOleMarshalObject.cs
- PowerModeChangedEventArgs.cs
- DBBindings.cs
- XmlAtomicValue.cs
- FlowPanelDesigner.cs
- ListControl.cs
- Freezable.cs
- AccessText.cs
- ControlUtil.cs
- NamedObject.cs