Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Serialization / System / Runtime / Serialization / Configuration / DeclaredTypeElement.cs / 1305376 / DeclaredTypeElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Runtime.Serialization.Configuration { using System; using System.Configuration; using System.Security.Permissions; using System.Security; public sealed partial class DeclaredTypeElement : ConfigurationElement { public DeclaredTypeElement() { } public DeclaredTypeElement(string typeName) : this() { if (String.IsNullOrEmpty(typeName)) { throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("typeName"); } this.Type = typeName; } [ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, DefaultValue = null, Options = ConfigurationPropertyOptions.IsDefaultCollection)] public TypeElementCollection KnownTypes { get { return (TypeElementCollection)base[ConfigurationStrings.DefaultCollectionName]; } } [ConfigurationProperty(ConfigurationStrings.Type, DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)] [DeclaredTypeValidator()] public string Type { get { return (string)base[ConfigurationStrings.Type]; } set { base[ConfigurationStrings.Type] = value; } } [Fx.Tag.SecurityNote(Critical = "Calls the critical methods of PartialTrustHelpers", Safe = "PartialTrustHelpers.IsInFullTrust demands for FullTrust")] [SecuritySafeCritical] protected override void PostDeserialize() { // Perf optimization. If the configuration is coming from machine.config // It is safe and we don't need to check for permissions. if (EvaluationContext.IsMachineLevel) { return; } if(!PartialTrustHelpers.IsInFullTrust()) { throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigDataContractSerializerSectionLoadError))); } } } } // 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
- SignedInfo.cs
- AssertSection.cs
- DbParameterHelper.cs
- MethodBody.cs
- DataReaderContainer.cs
- BindingsCollection.cs
- DataBindEngine.cs
- SslStreamSecurityUpgradeProvider.cs
- EllipseGeometry.cs
- MarshalByRefObject.cs
- PropertyMetadata.cs
- X509CertificateInitiatorServiceCredential.cs
- RedBlackList.cs
- TextTreeTextBlock.cs
- CookielessHelper.cs
- Lease.cs
- GridViewCellAutomationPeer.cs
- ContentTextAutomationPeer.cs
- _RequestCacheProtocol.cs
- NamedPipeConnectionPoolSettings.cs
- GeometryDrawing.cs
- SqlDependencyUtils.cs
- ProxyWebPartManager.cs
- XmlFormatWriterGenerator.cs
- Collection.cs
- HttpProfileBase.cs
- __FastResourceComparer.cs
- StylusCollection.cs
- XdrBuilder.cs
- OperationContractGenerationContext.cs
- InvalidCastException.cs
- ChtmlTextWriter.cs
- WindowsListView.cs
- FindCriteriaApril2005.cs
- QueryableDataSourceView.cs
- DbProviderServices.cs
- IDQuery.cs
- AtomParser.cs
- Transform3DCollection.cs
- OutputScopeManager.cs
- FileCodeGroup.cs
- Comparer.cs
- CacheOutputQuery.cs
- WindowsGraphicsWrapper.cs
- HandlerFactoryWrapper.cs
- OutOfProcStateClientManager.cs
- VisualStyleElement.cs
- BrushMappingModeValidation.cs
- BitmapCodecInfoInternal.cs
- ReplyAdapterChannelListener.cs
- UriTemplate.cs
- ParamArrayAttribute.cs
- DocumentPageHost.cs
- ToolStripSeparator.cs
- XmlUtil.cs
- Vector3DKeyFrameCollection.cs
- StringValidator.cs
- ContentTextAutomationPeer.cs
- SecurityTokenValidationException.cs
- InfoCardSymmetricCrypto.cs
- Image.cs
- ChannelPool.cs
- DmlSqlGenerator.cs
- LoginView.cs
- TableRowCollection.cs
- PropertyGrid.cs
- StubHelpers.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- FontStretchConverter.cs
- WebEventCodes.cs
- externdll.cs
- LinqDataSourceValidationException.cs
- HttpRuntimeSection.cs
- HwndMouseInputProvider.cs
- WmfPlaceableFileHeader.cs
- Point4D.cs
- ViewCellRelation.cs
- DeploymentSection.cs
- MessageDesigner.cs
- DBConcurrencyException.cs
- ConfigurationException.cs
- SqlWebEventProvider.cs
- ArgIterator.cs
- DiscoveryDocumentLinksPattern.cs
- ServiceEndpointElementCollection.cs
- HtmlLink.cs
- TreeWalker.cs
- BufferAllocator.cs
- WindowsSpinner.cs
- FlowDocumentReaderAutomationPeer.cs
- RelativeSource.cs
- BindingGroup.cs
- RelationshipFixer.cs
- ExtensionQuery.cs
- HtmlUtf8RawTextWriter.cs
- Permission.cs
- ClockGroup.cs
- TileModeValidation.cs
- wmiprovider.cs
- FindProgressChangedEventArgs.cs