Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / Script / Services / WebServiceEnumData.cs / 1 / WebServiceEnumData.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Globalization; namespace System.Web.Script.Services { using System; internal class WebServiceEnumData : WebServiceTypeData { bool isULong; string[] names; long[] values; internal WebServiceEnumData(string typeName, string typeNamespace, string[] names, long[] values, bool isULong) : base(typeName, typeNamespace) { InitWebServiceEnumData(names, values, isULong); } internal WebServiceEnumData(string typeName, string typeNamespace, Type t, string[] names, long[] values, bool isULong) : base(typeName, typeNamespace, t) { InitWebServiceEnumData(names, values, isULong); } internal WebServiceEnumData(string typeName, string typeNamespace, string[] names, Array values, bool isULong) : base(typeName, typeNamespace) { InitWebServiceEnumData(names, values, isULong); } internal WebServiceEnumData(string typeName, string typeNamespace, Type t, string[] names, Array values, bool isULong) : base(typeName, typeNamespace) { InitWebServiceEnumData(names, values, isULong); } internal bool IsULong { get { return isULong; } } internal string[] Names { get { return names; } } internal long[] Values { get { return values; } } private void InitWebServiceEnumData(string[] names, long[] values, bool isULong) { System.Diagnostics.Debug.Assert(names != null); System.Diagnostics.Debug.Assert(values != null); System.Diagnostics.Debug.Assert(names.Length == values.Length); this.names = names; this.values = values; this.isULong = isULong; } private void InitWebServiceEnumData(string[] names, Array values, bool isULong) { System.Diagnostics.Debug.Assert(names != null); System.Diagnostics.Debug.Assert(values != null); System.Diagnostics.Debug.Assert(names.Length == values.Length); this.names = names; this.values = new long[values.Length]; for (int i = 0; i < values.Length; i++) { object enumValue = values.GetValue(i); if (isULong) { this.values[i] = (long)((IConvertible)enumValue).ToUInt64(CultureInfo.InvariantCulture); } else { this.values[i] = ((IConvertible)enumValue).ToInt64(CultureInfo.InvariantCulture); } } this.isULong = isULong; } } } // 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
- Keyboard.cs
- XamlStream.cs
- CompressionTracing.cs
- SoapCodeExporter.cs
- HyperLinkDataBindingHandler.cs
- FastPropertyAccessor.cs
- StoreItemCollection.Loader.cs
- ClockController.cs
- AccessKeyManager.cs
- ArrayWithOffset.cs
- HMACMD5.cs
- TemplatedWizardStep.cs
- NominalTypeEliminator.cs
- ErrorStyle.cs
- SqlServices.cs
- DataContractAttribute.cs
- ImageAttributes.cs
- ProvidersHelper.cs
- OletxVolatileEnlistment.cs
- Html32TextWriter.cs
- TitleStyle.cs
- XmlComment.cs
- TextBlockAutomationPeer.cs
- BindToObject.cs
- XmlTextWriter.cs
- InvalidComObjectException.cs
- SystemSounds.cs
- ElementInit.cs
- TypeDescriptorFilterService.cs
- BufferAllocator.cs
- ApplicationCommands.cs
- Transform.cs
- DataContract.cs
- ContainerFilterService.cs
- XmlSchemaSubstitutionGroup.cs
- WebException.cs
- Timeline.cs
- Models.cs
- FormViewDeleteEventArgs.cs
- EnumMember.cs
- FormatConvertedBitmap.cs
- DetailsViewUpdatedEventArgs.cs
- HtmlTitle.cs
- CachedCompositeFamily.cs
- FacetValues.cs
- _NestedSingleAsyncResult.cs
- ApplicationServicesHostFactory.cs
- NgenServicingAttributes.cs
- TextProviderWrapper.cs
- Roles.cs
- LeaseManager.cs
- ModelPerspective.cs
- WorkflowPageSetupDialog.cs
- QuestionEventArgs.cs
- HtmlInputHidden.cs
- Attributes.cs
- UIAgentCrashedException.cs
- RowToParametersTransformer.cs
- TableSectionStyle.cs
- InvalidFilterCriteriaException.cs
- COM2ComponentEditor.cs
- AutomationPropertyInfo.cs
- MethodRental.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- Model3DCollection.cs
- DataGridPageChangedEventArgs.cs
- VirtualDirectoryMapping.cs
- WebConfigurationHost.cs
- COM2FontConverter.cs
- TypeForwardedToAttribute.cs
- XamlInterfaces.cs
- SqlCommandBuilder.cs
- LogExtentCollection.cs
- URI.cs
- DesignerActionUI.cs
- AmbiguousMatchException.cs
- DesigntimeLicenseContext.cs
- DayRenderEvent.cs
- AssemblyNameProxy.cs
- XmlDataCollection.cs
- ServiceOperationHelpers.cs
- StackBuilderSink.cs
- MachineKeySection.cs
- DataSourceControl.cs
- HwndSourceParameters.cs
- TraceSource.cs
- ContextQuery.cs
- AndAlso.cs
- XmlValidatingReaderImpl.cs
- PersonalizationStateQuery.cs
- FilterException.cs
- FontFamilyConverter.cs
- MouseWheelEventArgs.cs
- SortExpressionBuilder.cs
- TableLayoutPanelResizeGlyph.cs
- SqlLiftIndependentRowExpressions.cs
- SchemaInfo.cs
- PeerNearMe.cs
- ProfileSettingsCollection.cs
- CheckBoxFlatAdapter.cs