Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Serialization / System / Runtime / Serialization / SpecialTypeDataContract.cs / 1305376 / SpecialTypeDataContract.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Runtime.Serialization { using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.Security; sealed class SpecialTypeDataContract : DataContract { [Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that is cached statically for serialization." + " Static fields are marked SecurityCritical or readonly to prevent data from being modified or leaked to other components in appdomain.")] [SecurityCritical] SpecialTypeDataContractCriticalHelper helper; [Fx.Tag.SecurityNote(Critical = "Initializes SecurityCritical field 'helper'.", Safe = "Doesn't leak anything.")] [SecuritySafeCritical] public SpecialTypeDataContract(Type type) : base(new SpecialTypeDataContractCriticalHelper(type)) { helper = base.Helper as SpecialTypeDataContractCriticalHelper; } [Fx.Tag.SecurityNote(Critical = "Initializes SecurityCritical field 'helper'.", Safe = "Doesn't leak anything.")] [SecuritySafeCritical] public SpecialTypeDataContract(Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(new SpecialTypeDataContractCriticalHelper(type, name, ns)) { helper = base.Helper as SpecialTypeDataContractCriticalHelper; } internal override bool IsBuiltInDataContract { get { return true; } } [Fx.Tag.SecurityNote(Critical = "Holds all state used for for (de)serializing known types like System.Enum, System.ValueType, etc." + " Since the data is cached statically, we lock down access to it.")] [SecurityCritical(SecurityCriticalScope.Everything)] class SpecialTypeDataContractCriticalHelper : DataContract.DataContractCriticalHelper { internal SpecialTypeDataContractCriticalHelper(Type type) : base(type) { } internal SpecialTypeDataContractCriticalHelper(Type type, XmlDictionaryString name, XmlDictionaryString ns) : base(type) { SetDataContractName(name, ns); } } } } // 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
- TextControlDesigner.cs
- ElementAtQueryOperator.cs
- DataGridAutomationPeer.cs
- AuthenticationSection.cs
- ScriptResourceHandler.cs
- InvalidPrinterException.cs
- CacheVirtualItemsEvent.cs
- XPathNodeInfoAtom.cs
- IdentityNotMappedException.cs
- SiteMap.cs
- PrimaryKeyTypeConverter.cs
- ADMembershipUser.cs
- SystemIPGlobalProperties.cs
- DrawingBrush.cs
- TreeBuilder.cs
- BufferModesCollection.cs
- BindingCollection.cs
- X509CertificateEndpointIdentity.cs
- XsdBuildProvider.cs
- XsdDuration.cs
- MSAAWinEventWrap.cs
- Activator.cs
- AssemblyAttributesGoHere.cs
- jithelpers.cs
- Variant.cs
- ResourceContainer.cs
- DataGridCaption.cs
- MultiTrigger.cs
- ContainerFilterService.cs
- SettingsPropertyNotFoundException.cs
- AxHost.cs
- RpcAsyncResult.cs
- SafeRightsManagementEnvironmentHandle.cs
- httpstaticobjectscollection.cs
- RowSpanVector.cs
- Hash.cs
- TypeLibConverter.cs
- TypeLoadException.cs
- SafeRightsManagementPubHandle.cs
- ListViewPagedDataSource.cs
- FontDriver.cs
- DataObjectEventArgs.cs
- DataGridViewRowStateChangedEventArgs.cs
- SHA256Managed.cs
- InfoCardX509Validator.cs
- ReadOnlyMetadataCollection.cs
- EdmComplexTypeAttribute.cs
- PersonalizablePropertyEntry.cs
- ControlBindingsConverter.cs
- DataControlPagerLinkButton.cs
- DictionarySectionHandler.cs
- ExpandSegmentCollection.cs
- UTF32Encoding.cs
- HttpCachePolicy.cs
- NameValueFileSectionHandler.cs
- SignatureConfirmations.cs
- AssemblyBuilder.cs
- PropertyStore.cs
- HasCopySemanticsAttribute.cs
- AddDataControlFieldDialog.cs
- SafeLibraryHandle.cs
- ToolStripArrowRenderEventArgs.cs
- DesignerSerializationVisibilityAttribute.cs
- StructuredTypeEmitter.cs
- CurrentTimeZone.cs
- NestedContainer.cs
- BuildProvider.cs
- CompilationRelaxations.cs
- WeakRefEnumerator.cs
- SpeechDetectedEventArgs.cs
- EnvelopedPkcs7.cs
- WsiProfilesElementCollection.cs
- EdmComplexTypeAttribute.cs
- sapiproxy.cs
- HttpValueCollection.cs
- BitmapEffectGroup.cs
- UInt64Storage.cs
- x509utils.cs
- TrackingLocationCollection.cs
- DrawListViewColumnHeaderEventArgs.cs
- GenericXmlSecurityToken.cs
- EnumerableCollectionView.cs
- SqlError.cs
- PasswordPropertyTextAttribute.cs
- JsonObjectDataContract.cs
- ToolStripKeyboardHandlingService.cs
- String.cs
- MsmqInputSessionChannel.cs
- PeerTransportListenAddressConverter.cs
- unitconverter.cs
- ServicePointManager.cs
- _ListenerAsyncResult.cs
- SpeechRecognizer.cs
- HtmlPhoneCallAdapter.cs
- KnownColorTable.cs
- InvalidOleVariantTypeException.cs
- XpsStructure.cs
- Brushes.cs
- DrawListViewItemEventArgs.cs
- ButtonPopupAdapter.cs