Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / Configuration / MachineSettingsSection.cs / 1305376 / MachineSettingsSection.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Transactions.Configuration { using System.Configuration; using System.Collections.Generic; using System.Globalization; public sealed class MachineSettingsSection : ConfigurationSection { public MachineSettingsSection() : base() { } // System.Transactions reads the Configuration information in a non destructive way. static internal MachineSettingsSection GetSection() { MachineSettingsSection retval = (MachineSettingsSection)PrivilegedConfigurationManager.GetSection(ConfigurationStrings.MachineSettingsSectionPath); if (retval == null) { throw new ConfigurationErrorsException(string.Format(CultureInfo.CurrentCulture, SR.GetString(SR.ConfigurationSectionNotFound), ConfigurationStrings.MachineSettingsSectionPath)); } return retval; } // public properties [ConfigurationProperty(ConfigurationStrings.MaxTimeout, DefaultValue=ConfigurationStrings.DefaultMaxTimeout)] [TimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero, MaxValueString=TimeSpanValidatorAttribute.TimeSpanMaxValue)] public TimeSpan MaxTimeout { // System.Transactions reads the Configuration information in a non destructive way. get { return (TimeSpan)base[ConfigurationStrings.MaxTimeout];} set { if (!ConfigurationStrings.IsValidTimeSpan(value)) { throw new ArgumentOutOfRangeException("MaxTimeout", SR.GetString(SR.ConfigInvalidTimeSpanValue)); } base[ConfigurationStrings.MaxTimeout] = value; } } protected override ConfigurationPropertyCollection Properties { get { ConfigurationPropertyCollection retval = new ConfigurationPropertyCollection(); retval.Add(new ConfigurationProperty( ConfigurationStrings.MaxTimeout, typeof(TimeSpan), ConfigurationStrings.DefaultMaxTimeout, null, new TimeSpanValidator( TimeSpan.Zero, TimeSpan.MaxValue ), ConfigurationPropertyOptions.None)); return retval; } } } } // 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
- PerfService.cs
- WindowsRegion.cs
- StdValidatorsAndConverters.cs
- PageClientProxyGenerator.cs
- ListViewItem.cs
- COM2ColorConverter.cs
- WrappedDispatcherException.cs
- ResourceContainer.cs
- DynamicContractTypeBuilder.cs
- ImportContext.cs
- FlowDocumentReader.cs
- NumberEdit.cs
- RightsManagementPermission.cs
- TableCellCollection.cs
- IisTraceListener.cs
- GenerateTemporaryAssemblyTask.cs
- StringValidator.cs
- DataSourceDesigner.cs
- GridToolTip.cs
- ObjectSecurityT.cs
- WebSysDefaultValueAttribute.cs
- PassportAuthenticationEventArgs.cs
- HttpPostServerProtocol.cs
- _ProxyRegBlob.cs
- DataServiceStreamProviderWrapper.cs
- ReflectTypeDescriptionProvider.cs
- ellipse.cs
- ObservableCollectionDefaultValueFactory.cs
- ReflectEventDescriptor.cs
- SHA1.cs
- InvalidPropValue.cs
- DataGridViewUtilities.cs
- UIElementCollection.cs
- SimpleType.cs
- StrokeIntersection.cs
- DataBoundControlAdapter.cs
- TabRenderer.cs
- PolicyValidationException.cs
- XmlMapping.cs
- Label.cs
- VoiceInfo.cs
- SafeNativeMethods.cs
- safemediahandle.cs
- NavigationHelper.cs
- LineGeometry.cs
- TimeoutTimer.cs
- GetCertificateRequest.cs
- RotateTransform.cs
- QuotedStringFormatReader.cs
- FrameworkTemplate.cs
- DataObjectFieldAttribute.cs
- Propagator.Evaluator.cs
- SourceSwitch.cs
- System.Data_BID.cs
- PageBuildProvider.cs
- HtmlInputButton.cs
- DataGridCaption.cs
- SessionStateContainer.cs
- Ticks.cs
- NumberSubstitution.cs
- DataGridColumnCollectionEditor.cs
- DataGridLinkButton.cs
- HtmlInputReset.cs
- QueryExpression.cs
- QilInvoke.cs
- BaseComponentEditor.cs
- _AcceptOverlappedAsyncResult.cs
- TraceEventCache.cs
- DoubleAnimationClockResource.cs
- EventSetter.cs
- PublisherMembershipCondition.cs
- XmlLinkedNode.cs
- DependencyPropertyKind.cs
- FixedPage.cs
- HelpProvider.cs
- HttpRequestTraceRecord.cs
- FieldNameLookup.cs
- DataControlFieldHeaderCell.cs
- TextInfo.cs
- StreamUpgradeInitiator.cs
- PathData.cs
- Int16AnimationBase.cs
- SecondaryViewProvider.cs
- PeerReferralPolicy.cs
- NavigationWindowAutomationPeer.cs
- HandlerFactoryCache.cs
- DataExpression.cs
- CodeGenHelper.cs
- AssociationType.cs
- HtmlTableRowCollection.cs
- ControlType.cs
- SessionViewState.cs
- PenCursorManager.cs
- Int32AnimationBase.cs
- WebBrowsableAttribute.cs
- WebUtil.cs
- PropertyEmitter.cs
- BufferedGraphics.cs
- PropertyMappingExceptionEventArgs.cs
- OracleException.cs