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
- thaishape.cs
- DataObjectCopyingEventArgs.cs
- FilterQuery.cs
- XmlLoader.cs
- EventLogTraceListener.cs
- StateMachineTimers.cs
- Material.cs
- WorkflowStateRollbackService.cs
- Operand.cs
- MarginsConverter.cs
- RadialGradientBrush.cs
- WebSysDefaultValueAttribute.cs
- FieldMetadata.cs
- MarshalByValueComponent.cs
- Inline.cs
- SchemaTableColumn.cs
- Nodes.cs
- Tuple.cs
- DBPropSet.cs
- StrokeNodeOperations2.cs
- SqlDataSourceQueryEditor.cs
- WinFormsUtils.cs
- HttpRequest.cs
- GeneralTransform.cs
- AttributeCollection.cs
- DetailsViewDeletedEventArgs.cs
- VersionUtil.cs
- CustomTokenProvider.cs
- UserControl.cs
- SchemaExporter.cs
- ToolStripContentPanel.cs
- PackageStore.cs
- XPathChildIterator.cs
- HeaderCollection.cs
- NumberFormatInfo.cs
- CodeExpressionCollection.cs
- PointIndependentAnimationStorage.cs
- EmptyCollection.cs
- FormsAuthenticationTicket.cs
- WebUtil.cs
- SelectionRangeConverter.cs
- StoreItemCollection.cs
- DataGridViewRow.cs
- StyleTypedPropertyAttribute.cs
- VisualStateManager.cs
- WebPartUserCapability.cs
- WebEvents.cs
- AttachedAnnotation.cs
- HandleRef.cs
- ISAPIRuntime.cs
- OracleBoolean.cs
- InkCanvasInnerCanvas.cs
- ItemChangedEventArgs.cs
- CryptoStream.cs
- XPathAxisIterator.cs
- PathGeometry.cs
- ToolZoneDesigner.cs
- TriggerAction.cs
- FontCacheLogic.cs
- TypeBuilderInstantiation.cs
- ObjectSecurity.cs
- BitmapEffectInput.cs
- CollectionBuilder.cs
- CacheRequest.cs
- HelpInfo.cs
- X509Utils.cs
- ProcessModelInfo.cs
- XmlSchemaValidationException.cs
- CodeAttributeArgumentCollection.cs
- Point3DCollectionConverter.cs
- XmlSchemaException.cs
- Sql8ConformanceChecker.cs
- EditingMode.cs
- PageBuildProvider.cs
- Listbox.cs
- MethodToken.cs
- DoubleUtil.cs
- TrustLevel.cs
- ZipFileInfo.cs
- NullableLongAverageAggregationOperator.cs
- EventManager.cs
- ListViewItem.cs
- SignedXmlDebugLog.cs
- EncoderBestFitFallback.cs
- DBAsyncResult.cs
- MessageDecoder.cs
- EventEntry.cs
- MD5.cs
- XComponentModel.cs
- EntityContainerRelationshipSet.cs
- OrderByBuilder.cs
- HotSpotCollection.cs
- DataServicePagingProviderWrapper.cs
- AuthorizationRule.cs
- OleDbInfoMessageEvent.cs
- FrameworkElementFactory.cs
- Model3D.cs
- ADMembershipUser.cs
- DataViewSettingCollection.cs
- XmlAttributeCollection.cs