Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / Serialization / System / Runtime / Serialization / Configuration / DeclaredTypeElement.cs / 1 / 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; } } 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; } try { new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand(); } catch (SecurityException e) { throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigDataContractSerializerSectionLoadError), e)); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PaintValueEventArgs.cs
- ToolStripLocationCancelEventArgs.cs
- ContainerActivationHelper.cs
- Italic.cs
- AlignmentYValidation.cs
- EditorPart.cs
- MemberAssignment.cs
- DataSourceSelectArguments.cs
- HttpRuntime.cs
- Profiler.cs
- EncryptedKey.cs
- entityreference_tresulttype.cs
- ComponentResourceManager.cs
- RelationshipEndMember.cs
- SchemaTypeEmitter.cs
- ColumnReorderedEventArgs.cs
- SortableBindingList.cs
- OracleSqlParser.cs
- HtmlControlPersistable.cs
- XPathParser.cs
- SecurityRuntime.cs
- PrimitiveType.cs
- VectorCollectionValueSerializer.cs
- HttpCookiesSection.cs
- PipeStream.cs
- WebPartConnectionsConfigureVerb.cs
- TextEditorLists.cs
- CollectionType.cs
- SchemaImporter.cs
- ServiceNameElementCollection.cs
- StoragePropertyMapping.cs
- SafeNativeMethods.cs
- XmlSchemaValidator.cs
- DocumentSchemaValidator.cs
- ComboBoxAutomationPeer.cs
- ManualResetEvent.cs
- DataSourceProvider.cs
- DependencyObjectCodeDomSerializer.cs
- httpapplicationstate.cs
- OleDbWrapper.cs
- InputManager.cs
- ByeOperation11AsyncResult.cs
- CellPartitioner.cs
- Graphics.cs
- PolyLineSegmentFigureLogic.cs
- LoginName.cs
- WindowProviderWrapper.cs
- TemplateBindingExpressionConverter.cs
- RewritingPass.cs
- CodeDirectoryCompiler.cs
- VectorAnimationUsingKeyFrames.cs
- SiteMembershipCondition.cs
- OperationInfoBase.cs
- XhtmlBasicLinkAdapter.cs
- SRGSCompiler.cs
- MemberHolder.cs
- SequenceFullException.cs
- StylusEventArgs.cs
- SocketAddress.cs
- XPathEmptyIterator.cs
- ListControlBoundActionList.cs
- GrammarBuilderBase.cs
- TypeContext.cs
- QilGeneratorEnv.cs
- ValueType.cs
- EarlyBoundInfo.cs
- Mouse.cs
- LightweightCodeGenerator.cs
- PathFigure.cs
- BaseTreeIterator.cs
- LineGeometry.cs
- Dispatcher.cs
- ConfigUtil.cs
- TaskResultSetter.cs
- SqlDataSourceQueryEditorForm.cs
- ExpressionNormalizer.cs
- AddInServer.cs
- DataSourceControlBuilder.cs
- NegotiateStream.cs
- CodeNamespaceImport.cs
- ExpressionReplacer.cs
- Int16AnimationUsingKeyFrames.cs
- ArrayList.cs
- XmlHierarchyData.cs
- SpecialNameAttribute.cs
- HMACSHA1.cs
- Activity.cs
- IndentTextWriter.cs
- TcpProcessProtocolHandler.cs
- TemplateApplicationHelper.cs
- Vector3DAnimationBase.cs
- ToolboxDataAttribute.cs
- SapiGrammar.cs
- Merger.cs
- TypeElementCollection.cs
- CommonProperties.cs
- FontUnitConverter.cs
- XmlElementList.cs
- NegatedCellConstant.cs
- AdjustableArrowCap.cs