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
- ColorAnimation.cs
- DataGridViewDataConnection.cs
- LogicalChannel.cs
- LogSwitch.cs
- CheckBoxField.cs
- Item.cs
- DataGridPreparingCellForEditEventArgs.cs
- PagesChangedEventArgs.cs
- DesignerCalendarAdapter.cs
- Light.cs
- HtmlControl.cs
- GridPatternIdentifiers.cs
- ColumnWidthChangingEvent.cs
- BulletDecorator.cs
- PhonemeConverter.cs
- ButtonFieldBase.cs
- RegexMatch.cs
- WebFaultClientMessageInspector.cs
- XPathBinder.cs
- SizeAnimation.cs
- DashStyle.cs
- XmlBindingWorker.cs
- DBConnection.cs
- CallbackValidator.cs
- XmlSchemaChoice.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- IPCCacheManager.cs
- HwndAppCommandInputProvider.cs
- OrderByLifter.cs
- ProcessingInstructionAction.cs
- DataGridViewAutoSizeModeEventArgs.cs
- FilteredSchemaElementLookUpTable.cs
- DocumentReferenceCollection.cs
- DirectionalLight.cs
- PropertyTab.cs
- ListViewItem.cs
- ValueQuery.cs
- ScrollBarAutomationPeer.cs
- RelativeSource.cs
- Int16Animation.cs
- TextParaLineResult.cs
- UserControlParser.cs
- DataListItem.cs
- CustomValidator.cs
- NullableFloatSumAggregationOperator.cs
- ColorAnimationBase.cs
- MiniAssembly.cs
- ParameterCollection.cs
- SoapExtensionStream.cs
- HttpWebRequest.cs
- EntityDataSourceStatementEditorForm.cs
- AppDomainManager.cs
- CriticalHandle.cs
- EventPrivateKey.cs
- DesignObjectWrapper.cs
- DatatypeImplementation.cs
- DrawingAttributesDefaultValueFactory.cs
- ObjectToken.cs
- ListViewInsertionMark.cs
- ItemsControlAutomationPeer.cs
- GridEntry.cs
- _TimerThread.cs
- CodeTypeParameter.cs
- FileAuthorizationModule.cs
- UnsafeNativeMethodsCLR.cs
- ExpanderAutomationPeer.cs
- RemoteArgument.cs
- PostBackOptions.cs
- TextReader.cs
- FixedSOMTableCell.cs
- ModuleBuilderData.cs
- StateMachineWorkflowDesigner.cs
- ExpressionLink.cs
- XmlSignatureProperties.cs
- SqlCacheDependencyDatabaseCollection.cs
- Rights.cs
- FocusWithinProperty.cs
- QuotedPairReader.cs
- ReachDocumentReferenceSerializerAsync.cs
- BitmapPalettes.cs
- MD5CryptoServiceProvider.cs
- DiscreteKeyFrames.cs
- MeasureData.cs
- StorageEndPropertyMapping.cs
- PropertyIdentifier.cs
- UserControl.cs
- RandomDelaySendsAsyncResult.cs
- HttpResponseInternalWrapper.cs
- BrowserCapabilitiesCompiler.cs
- Matrix3D.cs
- OleDbCommand.cs
- LassoSelectionBehavior.cs
- HtmlSelect.cs
- TemplateColumn.cs
- ProvidePropertyAttribute.cs
- Image.cs
- ConfigXmlText.cs
- DataGridViewRowCancelEventArgs.cs
- VisualBrush.cs
- MatrixStack.cs