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
- TableLayoutColumnStyleCollection.cs
- WebPartZoneCollection.cs
- ObjectStateManager.cs
- LinearQuaternionKeyFrame.cs
- LinkedResource.cs
- SQLResource.cs
- DynamicDocumentPaginator.cs
- InteropAutomationProvider.cs
- ComponentRenameEvent.cs
- GuidTagList.cs
- TableSectionStyle.cs
- ArrayWithOffset.cs
- DoWorkEventArgs.cs
- UrlPropertyAttribute.cs
- WpfKnownMember.cs
- RunClient.cs
- XmlAttributeCollection.cs
- BufferedGraphicsManager.cs
- XmlImplementation.cs
- AuthenticatedStream.cs
- IncrementalReadDecoders.cs
- HttpModuleActionCollection.cs
- Canvas.cs
- AccessViolationException.cs
- TextEffectResolver.cs
- ChangeProcessor.cs
- AsmxEndpointPickerExtension.cs
- _NetRes.cs
- TypeInfo.cs
- Help.cs
- FunctionNode.cs
- PrintController.cs
- FileVersionInfo.cs
- HwndSource.cs
- ServiceDurableInstance.cs
- GridViewPageEventArgs.cs
- SqlParameter.cs
- Icon.cs
- GridLengthConverter.cs
- DragEvent.cs
- UserPreferenceChangedEventArgs.cs
- DefaultValueTypeConverter.cs
- TreeView.cs
- SafeCryptoHandles.cs
- Action.cs
- TypeExtensionConverter.cs
- ColumnClickEvent.cs
- SharedPersonalizationStateInfo.cs
- ListItemsPage.cs
- VerificationException.cs
- MouseGesture.cs
- Utils.cs
- DesignerPerfEventProvider.cs
- WpfXamlLoader.cs
- XmlAttributeProperties.cs
- SessionStateContainer.cs
- StringKeyFrameCollection.cs
- MULTI_QI.cs
- CustomAttributeSerializer.cs
- DataGridViewRowPrePaintEventArgs.cs
- XmlParser.cs
- PointLight.cs
- ThreadAbortException.cs
- CodeTryCatchFinallyStatement.cs
- SoapSchemaMember.cs
- CodeSnippetExpression.cs
- NominalTypeEliminator.cs
- ClockController.cs
- UserControlDesigner.cs
- LineSegment.cs
- SqlGenericUtil.cs
- XmlEncoding.cs
- SystemInfo.cs
- UrlAuthorizationModule.cs
- ECDsa.cs
- RegistryConfigurationProvider.cs
- MailDefinition.cs
- _TransmitFileOverlappedAsyncResult.cs
- QilName.cs
- PersonalizationProvider.cs
- RemotingSurrogateSelector.cs
- LinqDataSource.cs
- HashUtility.cs
- SiteMapHierarchicalDataSourceView.cs
- sqlmetadatafactory.cs
- Char.cs
- TimeSpan.cs
- DocumentOutline.cs
- ImageMap.cs
- EditorPartCollection.cs
- HostedElements.cs
- ManagementPath.cs
- IInstanceTable.cs
- Localizer.cs
- KeyTimeConverter.cs
- WebSysDescriptionAttribute.cs
- FormViewInsertEventArgs.cs
- FieldMetadata.cs
- RepeaterItem.cs
- FrameworkTextComposition.cs