Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Serialization / SoapAttributes.cs / 1305376 / SoapAttributes.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Serialization { using System; using System.Reflection; using System.Collections; using System.ComponentModel; internal enum SoapAttributeFlags { Enum = 0x1, Type = 0x2, Element = 0x4, Attribute = 0x8, } ////// /// public class SoapAttributes { bool soapIgnore; SoapTypeAttribute soapType; SoapElementAttribute soapElement; SoapAttributeAttribute soapAttribute; SoapEnumAttribute soapEnum; object soapDefaultValue = null; ///[To be supplied.] ////// /// public SoapAttributes() { } ///[To be supplied.] ////// /// public SoapAttributes(ICustomAttributeProvider provider) { object[] attrs = provider.GetCustomAttributes(false); for (int i = 0; i < attrs.Length; i++) { if (attrs[i] is SoapIgnoreAttribute || attrs[i] is ObsoleteAttribute) { this.soapIgnore = true; break; } else if (attrs[i] is SoapElementAttribute) { this.soapElement = (SoapElementAttribute)attrs[i]; } else if (attrs[i] is SoapAttributeAttribute) { this.soapAttribute = (SoapAttributeAttribute)attrs[i]; } else if (attrs[i] is SoapTypeAttribute) { this.soapType = (SoapTypeAttribute)attrs[i]; } else if (attrs[i] is SoapEnumAttribute) { this.soapEnum = (SoapEnumAttribute)attrs[i]; } else if (attrs[i] is DefaultValueAttribute) { this.soapDefaultValue = ((DefaultValueAttribute)attrs[i]).Value; } } if (soapIgnore) { this.soapElement = null; this.soapAttribute = null; this.soapType = null; this.soapEnum = null; this.soapDefaultValue = null; } } internal SoapAttributeFlags SoapFlags { get { SoapAttributeFlags flags = 0; if (soapElement != null) flags |= SoapAttributeFlags.Element; if (soapAttribute != null) flags |= SoapAttributeFlags.Attribute; if (soapEnum != null) flags |= SoapAttributeFlags.Enum; if (soapType != null) flags |= SoapAttributeFlags.Type; return flags; } } ///[To be supplied.] ////// /// public SoapTypeAttribute SoapType { get { return soapType; } set { soapType = value; } } ///[To be supplied.] ////// /// public SoapEnumAttribute SoapEnum { get { return soapEnum; } set { soapEnum = value; } } ///[To be supplied.] ////// /// public bool SoapIgnore { get { return soapIgnore; } set { soapIgnore = value; } } ///[To be supplied.] ////// /// public SoapElementAttribute SoapElement { get { return soapElement; } set { soapElement = value; } } ///[To be supplied.] ////// /// public SoapAttributeAttribute SoapAttribute { get { return soapAttribute; } set { soapAttribute = value; } } ///[To be supplied.] ////// /// public object SoapDefaultValue { get { return soapDefaultValue; } set { soapDefaultValue = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Serialization { using System; using System.Reflection; using System.Collections; using System.ComponentModel; internal enum SoapAttributeFlags { Enum = 0x1, Type = 0x2, Element = 0x4, Attribute = 0x8, } ////// /// public class SoapAttributes { bool soapIgnore; SoapTypeAttribute soapType; SoapElementAttribute soapElement; SoapAttributeAttribute soapAttribute; SoapEnumAttribute soapEnum; object soapDefaultValue = null; ///[To be supplied.] ////// /// public SoapAttributes() { } ///[To be supplied.] ////// /// public SoapAttributes(ICustomAttributeProvider provider) { object[] attrs = provider.GetCustomAttributes(false); for (int i = 0; i < attrs.Length; i++) { if (attrs[i] is SoapIgnoreAttribute || attrs[i] is ObsoleteAttribute) { this.soapIgnore = true; break; } else if (attrs[i] is SoapElementAttribute) { this.soapElement = (SoapElementAttribute)attrs[i]; } else if (attrs[i] is SoapAttributeAttribute) { this.soapAttribute = (SoapAttributeAttribute)attrs[i]; } else if (attrs[i] is SoapTypeAttribute) { this.soapType = (SoapTypeAttribute)attrs[i]; } else if (attrs[i] is SoapEnumAttribute) { this.soapEnum = (SoapEnumAttribute)attrs[i]; } else if (attrs[i] is DefaultValueAttribute) { this.soapDefaultValue = ((DefaultValueAttribute)attrs[i]).Value; } } if (soapIgnore) { this.soapElement = null; this.soapAttribute = null; this.soapType = null; this.soapEnum = null; this.soapDefaultValue = null; } } internal SoapAttributeFlags SoapFlags { get { SoapAttributeFlags flags = 0; if (soapElement != null) flags |= SoapAttributeFlags.Element; if (soapAttribute != null) flags |= SoapAttributeFlags.Attribute; if (soapEnum != null) flags |= SoapAttributeFlags.Enum; if (soapType != null) flags |= SoapAttributeFlags.Type; return flags; } } ///[To be supplied.] ////// /// public SoapTypeAttribute SoapType { get { return soapType; } set { soapType = value; } } ///[To be supplied.] ////// /// public SoapEnumAttribute SoapEnum { get { return soapEnum; } set { soapEnum = value; } } ///[To be supplied.] ////// /// public bool SoapIgnore { get { return soapIgnore; } set { soapIgnore = value; } } ///[To be supplied.] ////// /// public SoapElementAttribute SoapElement { get { return soapElement; } set { soapElement = value; } } ///[To be supplied.] ////// /// public SoapAttributeAttribute SoapAttribute { get { return soapAttribute; } set { soapAttribute = value; } } ///[To be supplied.] ////// /// public object SoapDefaultValue { get { return soapDefaultValue; } set { soapDefaultValue = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FlowDocumentFormatter.cs
- TransformerTypeCollection.cs
- UpDownBase.cs
- ChildrenQuery.cs
- HitTestDrawingContextWalker.cs
- SqlTriggerContext.cs
- ViewStateModeByIdAttribute.cs
- ObjectStateManager.cs
- StatusBar.cs
- CheckBoxFlatAdapter.cs
- DeviceFilterDictionary.cs
- UnsafeNativeMethods.cs
- DocumentGridContextMenu.cs
- InkSerializer.cs
- ConfigurationManagerHelper.cs
- TreeViewAutomationPeer.cs
- OutputCacheProviderCollection.cs
- TextTreeFixupNode.cs
- TextServicesDisplayAttribute.cs
- ListCollectionView.cs
- NamespaceQuery.cs
- AVElementHelper.cs
- SqlServices.cs
- Control.cs
- ButtonFieldBase.cs
- XsltQilFactory.cs
- PrivateFontCollection.cs
- SQLStringStorage.cs
- AmbientLight.cs
- SerializationStore.cs
- ErrorHandler.cs
- BooleanConverter.cs
- EditorZone.cs
- PageThemeBuildProvider.cs
- BitmapCodecInfo.cs
- LoginDesignerUtil.cs
- InternalPolicyElement.cs
- TemplatePropertyEntry.cs
- ListViewItem.cs
- ListViewAutomationPeer.cs
- WorkflowTraceTransfer.cs
- DrawingContextDrawingContextWalker.cs
- ZipIOLocalFileDataDescriptor.cs
- ContainerControl.cs
- ConditionBrowserDialog.cs
- securestring.cs
- ClientApiGenerator.cs
- SQLDecimal.cs
- SqlFlattener.cs
- ImageSource.cs
- IriParsingElement.cs
- FormView.cs
- OleAutBinder.cs
- ProgressBar.cs
- SqlLiftWhereClauses.cs
- StrongNameKeyPair.cs
- ErrorInfoXmlDocument.cs
- XmlTextAttribute.cs
- EnvelopedPkcs7.cs
- RootNamespaceAttribute.cs
- CLRBindingWorker.cs
- SubpageParaClient.cs
- InitializationEventAttribute.cs
- StatusBar.cs
- TransactedBatchingElement.cs
- TableCell.cs
- MimeTypeMapper.cs
- AppearanceEditorPart.cs
- CompatibleComparer.cs
- Internal.cs
- Utils.cs
- ModelPerspective.cs
- DesignTable.cs
- Queue.cs
- OleDbCommandBuilder.cs
- CodeExpressionStatement.cs
- IdnMapping.cs
- SafeRightsManagementHandle.cs
- RuntimeResourceSet.cs
- SolidBrush.cs
- SemanticKeyElement.cs
- Stack.cs
- ContainerUtilities.cs
- ThreadStartException.cs
- SmtpCommands.cs
- DesignerLabelAdapter.cs
- DataPagerField.cs
- PointAnimationClockResource.cs
- DataGridViewTopRowAccessibleObject.cs
- objectquery_tresulttype.cs
- ContentElement.cs
- ExtendedPropertyInfo.cs
- TabletCollection.cs
- DataGrid.cs
- ScrollChangedEventArgs.cs
- SynchronizationValidator.cs
- DataRecord.cs
- JulianCalendar.cs
- BindingList.cs
- Stack.cs