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
- ToolStrip.cs
- FontNamesConverter.cs
- UpdateCommandGenerator.cs
- LogRestartAreaEnumerator.cs
- QilBinary.cs
- FontUnitConverter.cs
- AppDomainCompilerProxy.cs
- ImpersonateTokenRef.cs
- BufferModeSettings.cs
- UnsafeNativeMethods.cs
- DataGridItemEventArgs.cs
- MobileTextWriter.cs
- IncomingWebResponseContext.cs
- HttpBrowserCapabilitiesWrapper.cs
- WorkflowQueue.cs
- IDQuery.cs
- CallbackValidatorAttribute.cs
- ImagingCache.cs
- OleDbError.cs
- ResourceIDHelper.cs
- FileSystemInfo.cs
- SqlDataSource.cs
- WindowCollection.cs
- InvalidOperationException.cs
- RefreshPropertiesAttribute.cs
- Opcode.cs
- CodeMemberField.cs
- XslAst.cs
- PageContent.cs
- RolePrincipal.cs
- UndirectedGraph.cs
- Calendar.cs
- EntityKey.cs
- ObjectParameter.cs
- InvalidCommandTreeException.cs
- PermissionListSet.cs
- QueryAsyncResult.cs
- SqlDataSourceAdvancedOptionsForm.cs
- SqlUnionizer.cs
- AuthStoreRoleProvider.cs
- RSAOAEPKeyExchangeDeformatter.cs
- EntityCommand.cs
- SqlEnums.cs
- ReferencedAssemblyResolver.cs
- InheritanceAttribute.cs
- DataColumn.cs
- SingleAnimationBase.cs
- Missing.cs
- AggregateNode.cs
- XmlSchemaSimpleType.cs
- SqlConnectionStringBuilder.cs
- ProviderCollection.cs
- FlowDocumentPage.cs
- RouteItem.cs
- TextEditorSpelling.cs
- xdrvalidator.cs
- DataServiceEntityAttribute.cs
- UnsafeNativeMethodsMilCoreApi.cs
- EmptyStringExpandableObjectConverter.cs
- XslUrlEditor.cs
- NavigationFailedEventArgs.cs
- Menu.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SelectionService.cs
- Merger.cs
- ProgressPage.cs
- SharedHttpsTransportManager.cs
- TextFindEngine.cs
- StorageScalarPropertyMapping.cs
- Int16AnimationUsingKeyFrames.cs
- ResourceIDHelper.cs
- InkPresenter.cs
- FrameDimension.cs
- GrabHandleGlyph.cs
- QueryOutputWriter.cs
- Choices.cs
- SortableBindingList.cs
- DiscriminatorMap.cs
- DigestComparer.cs
- WebEvents.cs
- WorkflowApplicationTerminatedException.cs
- HttpRequestMessageProperty.cs
- MatrixCamera.cs
- CompositeScriptReference.cs
- MonitorWrapper.cs
- BamlLocalizationDictionary.cs
- ListMarkerSourceInfo.cs
- TextTreeDeleteContentUndoUnit.cs
- HostTimeoutsElement.cs
- RecipientInfo.cs
- DesignColumn.cs
- NamedPipeAppDomainProtocolHandler.cs
- FileDataSourceCache.cs
- DataControlPagerLinkButton.cs
- NavigatingCancelEventArgs.cs
- LinqDataSourceEditData.cs
- XPathCompileException.cs
- ArcSegment.cs
- _FixedSizeReader.cs
- ModelTreeManager.cs