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
- ComponentCache.cs
- HttpBrowserCapabilitiesBase.cs
- RelationshipEndCollection.cs
- DataGridViewSelectedCellCollection.cs
- CodeArrayIndexerExpression.cs
- FrugalMap.cs
- DesignerForm.cs
- DocumentViewerHelper.cs
- ClientConfigurationSystem.cs
- CustomWebEventKey.cs
- Scalars.cs
- MediaContext.cs
- FtpWebRequest.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- _ProxyRegBlob.cs
- DataGridViewCellStyleBuilderDialog.cs
- StringWriter.cs
- XamlVector3DCollectionSerializer.cs
- SafeThemeHandle.cs
- SortedList.cs
- GPPOINTF.cs
- StringArrayConverter.cs
- SelectionEditor.cs
- X509Utils.cs
- Item.cs
- BamlResourceDeserializer.cs
- EdmConstants.cs
- EntityDesignerBuildProvider.cs
- Math.cs
- DataSourceCacheDurationConverter.cs
- Compilation.cs
- AQNBuilder.cs
- ObjectDataSourceView.cs
- NameNode.cs
- Brush.cs
- FileVersionInfo.cs
- DataGridHelper.cs
- CatalogZone.cs
- MarkedHighlightComponent.cs
- ObjectQueryState.cs
- WpfKnownTypeInvoker.cs
- TableLayoutPanel.cs
- ChameleonKey.cs
- DataGridPageChangedEventArgs.cs
- InputBindingCollection.cs
- DefaultProxySection.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- QuadraticBezierSegment.cs
- ViewGenerator.cs
- ImageFormat.cs
- IndividualDeviceConfig.cs
- XmlSerializationReader.cs
- PropertyEmitter.cs
- ComplexTypeEmitter.cs
- FontFamilyValueSerializer.cs
- GlobalProxySelection.cs
- TdsParameterSetter.cs
- FileVersionInfo.cs
- Composition.cs
- SimpleLine.cs
- FixedTextView.cs
- XmlLanguage.cs
- _DomainName.cs
- CalendarDay.cs
- AutomationIdentifierGuids.cs
- FilteredSchemaElementLookUpTable.cs
- PropertyKey.cs
- BinaryObjectWriter.cs
- LoginView.cs
- TransformGroup.cs
- PrintPreviewControl.cs
- LowerCaseStringConverter.cs
- ProtocolsConfigurationEntry.cs
- MarkedHighlightComponent.cs
- FixedSOMElement.cs
- StorageMappingFragment.cs
- OrderedDictionary.cs
- ScrollEventArgs.cs
- AuthenticationSection.cs
- COMException.cs
- CLSCompliantAttribute.cs
- PropertyGridEditorPart.cs
- StringWriter.cs
- MobileCategoryAttribute.cs
- HtmlWindowCollection.cs
- TypeConverterAttribute.cs
- EventItfInfo.cs
- UIElement3DAutomationPeer.cs
- OutputWindow.cs
- QilName.cs
- RuntimeIdentifierPropertyAttribute.cs
- remotingproxy.cs
- TreeViewAutomationPeer.cs
- __FastResourceComparer.cs
- BitmapEffect.cs
- LinkClickEvent.cs
- Vector3DCollection.cs
- DescendantQuery.cs
- IdentityNotMappedException.cs
- XamlPoint3DCollectionSerializer.cs