Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OdbcErrorCollection.cs
- NameSpaceExtractor.cs
- TextBoxLine.cs
- HtmlCalendarAdapter.cs
- WindowsListViewItem.cs
- CommandSet.cs
- Keywords.cs
- Helper.cs
- SiteMapPath.cs
- SingleAnimationUsingKeyFrames.cs
- ToolStripItemCollection.cs
- Baml2006KnownTypes.cs
- RelationshipEntry.cs
- RijndaelManagedTransform.cs
- PtsPage.cs
- Literal.cs
- ArithmeticLiteral.cs
- OleDbMetaDataFactory.cs
- Metadata.cs
- ValueUnavailableException.cs
- LayoutUtils.cs
- SelectedDatesCollection.cs
- TypeLibConverter.cs
- KeyValueInternalCollection.cs
- SamlConstants.cs
- TlsnegoTokenProvider.cs
- Intellisense.cs
- UpdateTranslator.cs
- Util.cs
- DependencyPropertyValueSerializer.cs
- PropertyConverter.cs
- ErrorHandler.cs
- TypeSystemProvider.cs
- CompositionCommandSet.cs
- DataGridViewAdvancedBorderStyle.cs
- UnsupportedPolicyOptionsException.cs
- GreenMethods.cs
- XmlLoader.cs
- Source.cs
- SubMenuStyleCollection.cs
- EmptyStringExpandableObjectConverter.cs
- SiteMapPath.cs
- DesignerCalendarAdapter.cs
- XmlObjectSerializerContext.cs
- IDReferencePropertyAttribute.cs
- Double.cs
- Event.cs
- WsdlBuildProvider.cs
- XmlToDatasetMap.cs
- WebException.cs
- PathGeometry.cs
- TextureBrush.cs
- StringCollection.cs
- XmlSchemaObjectTable.cs
- ExpressionParser.cs
- HTTPRemotingHandler.cs
- AVElementHelper.cs
- ParserHooks.cs
- TimeZone.cs
- BooleanAnimationBase.cs
- DetailsViewInsertEventArgs.cs
- AnimationClock.cs
- IIS7UserPrincipal.cs
- FilteredAttributeCollection.cs
- SystemBrushes.cs
- MailWriter.cs
- HttpModuleActionCollection.cs
- TemplateControlCodeDomTreeGenerator.cs
- TextBoxBase.cs
- IPEndPoint.cs
- UnsafeNativeMethodsCLR.cs
- CodeArgumentReferenceExpression.cs
- GridViewSortEventArgs.cs
- ChangeNode.cs
- X509ThumbprintKeyIdentifierClause.cs
- DataGridColumnCollection.cs
- XmlSchemaSimpleContentRestriction.cs
- UIElementAutomationPeer.cs
- NameTable.cs
- ConstrainedDataObject.cs
- ProxyGenerator.cs
- ArrayConverter.cs
- WorkflowServiceHostFactory.cs
- DateTimePickerDesigner.cs
- XmlExpressionDumper.cs
- OleDbStruct.cs
- RoleManagerSection.cs
- LoginAutoFormat.cs
- OrderedDictionaryStateHelper.cs
- CompiledQueryCacheEntry.cs
- TextParentUndoUnit.cs
- ToolZone.cs
- Geometry3D.cs
- SystemColors.cs
- GridViewRowCollection.cs
- DataServiceSaveChangesEventArgs.cs
- RepeatButton.cs
- FragmentQuery.cs
- Splitter.cs
- AtomServiceDocumentSerializer.cs