Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ServiceElement.cs / 1 / ServiceElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Description; using System.Collections.Generic; using System.Globalization; using System.Security; public sealed partial class ServiceElement : ConfigurationElement, IConfigurationContextProviderInternal { ////// Critical - stores information used in a security decision /// [SecurityCritical] EvaluationContextHelper contextHelper; public ServiceElement() : base() {} public ServiceElement(string serviceName) : this() { this.Name = serviceName; } [ConfigurationProperty(ConfigurationStrings.BehaviorConfiguration, DefaultValue = "")] [StringValidator(MinLength = 0)] public string BehaviorConfiguration { get {return (string) base[ConfigurationStrings.BehaviorConfiguration]; } set { if (String.IsNullOrEmpty(value)) { value = String.Empty; } base[ConfigurationStrings.BehaviorConfiguration] = value; } } [ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, Options = ConfigurationPropertyOptions.IsDefaultCollection)] public ServiceEndpointElementCollection Endpoints { get {return (ServiceEndpointElementCollection) base[ConfigurationStrings.DefaultCollectionName]; } } [ConfigurationProperty(ConfigurationStrings.Host, Options = ConfigurationPropertyOptions.None)] public HostElement Host { get { return (HostElement)base[ConfigurationStrings.Host]; } } [ConfigurationProperty(ConfigurationStrings.Name, Options = ConfigurationPropertyOptions.IsKey | ConfigurationPropertyOptions.IsRequired)] [StringValidator(MinLength = 1)] public string Name { get {return (string) base[ConfigurationStrings.Name]; } set { if (String.IsNullOrEmpty(value)) { value = String.Empty; } base[ConfigurationStrings.Name] = value; } } ////// Critical - accesses critical field contextHelper /// [SecurityCritical] protected override void Reset(ConfigurationElement parentElement) { this.contextHelper.OnReset(parentElement); base.Reset(parentElement); } ContextInformation IConfigurationContextProviderInternal.GetEvaluationContext() { return this.EvaluationContext; } ////// Critical -- accesses critical field contextHelper /// RequiresReview -- the return value will be used for a security decision -- see comment in interface definition /// [SecurityCritical] ContextInformation IConfigurationContextProviderInternal.GetOriginalEvaluationContext() { return this.contextHelper.GetOriginalContext(this); } } } // 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
- StandardCommands.cs
- ModuleBuilderData.cs
- LayoutEditorPart.cs
- ComponentEditorPage.cs
- DrawingContext.cs
- VectorCollectionConverter.cs
- LinkDesigner.cs
- IsolatedStoragePermission.cs
- bindurihelper.cs
- GenericRootAutomationPeer.cs
- SqlUtils.cs
- DataGridViewRowStateChangedEventArgs.cs
- XPathMessageFilterElement.cs
- Point3DConverter.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ConstructorBuilder.cs
- PackWebRequest.cs
- ProfileSettings.cs
- SqlDependency.cs
- DefaultEvaluationContext.cs
- SourceElementsCollection.cs
- SqlBuffer.cs
- ThicknessKeyFrameCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- XmlQueryType.cs
- DataStreams.cs
- HttpModuleActionCollection.cs
- SqlConnectionPoolGroupProviderInfo.cs
- AsymmetricSignatureFormatter.cs
- ParallelDesigner.cs
- BaseCodePageEncoding.cs
- XComponentModel.cs
- BitArray.cs
- ErrorWebPart.cs
- Compilation.cs
- RadioButtonBaseAdapter.cs
- RectIndependentAnimationStorage.cs
- DetailsViewRowCollection.cs
- ResourceDescriptionAttribute.cs
- DataGridViewTextBoxCell.cs
- GetWinFXPath.cs
- ReflectionServiceProvider.cs
- HighlightVisual.cs
- AssociationSetMetadata.cs
- EtwTrace.cs
- TypeNameParser.cs
- NativeObjectSecurity.cs
- SymmetricKey.cs
- ReaderWriterLock.cs
- TextServicesCompartment.cs
- Baml2006KnownTypes.cs
- InstalledFontCollection.cs
- TraceUtility.cs
- Invariant.cs
- WebHeaderCollection.cs
- HighlightComponent.cs
- XPathNavigator.cs
- UIElement3D.cs
- TdsParserStateObject.cs
- ExecutedRoutedEventArgs.cs
- SoapInteropTypes.cs
- ConsoleTraceListener.cs
- AppearanceEditorPart.cs
- EntityUtil.cs
- WorkflowDispatchContext.cs
- JsonByteArrayDataContract.cs
- CodeCompileUnit.cs
- SaveFileDialog.cs
- EntityParameterCollection.cs
- NotSupportedException.cs
- ButtonColumn.cs
- CollectionViewGroup.cs
- WebBrowserContainer.cs
- ProcessHostFactoryHelper.cs
- DirectionalLight.cs
- ThrowHelper.cs
- TextAutomationPeer.cs
- ComponentRenameEvent.cs
- OpenTypeLayout.cs
- TempFiles.cs
- ToolTipAutomationPeer.cs
- MobileCapabilities.cs
- ScriptIgnoreAttribute.cs
- XamlNamespaceHelper.cs
- IRCollection.cs
- StringBlob.cs
- TextServicesProperty.cs
- BindingBase.cs
- AddInServer.cs
- XmlDownloadManager.cs
- PropertyConverter.cs
- HttpWebResponse.cs
- PersonalizableAttribute.cs
- LinearKeyFrames.cs
- DbUpdateCommandTree.cs
- PreviewPageInfo.cs
- WebBrowserNavigatedEventHandler.cs
- PseudoWebRequest.cs
- SqlNamer.cs
- CrossSiteScriptingValidation.cs