Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Serialization / System / Runtime / Serialization / DataMemberAttribute.cs / 1305376 / DataMemberAttribute.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Runtime.Serialization { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)] public sealed class DataMemberAttribute : Attribute { string name; bool isNameSetExplicit; int order = -1; bool isRequired; bool emitDefaultValue = Globals.DefaultEmitDefaultValue; public DataMemberAttribute() { } public string Name { get { return name; } set { name = value; isNameSetExplicit = true;} } internal bool IsNameSetExplicit { get { return isNameSetExplicit; } } public int Order { get { return order; } set { if (value < 0) throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.OrderCannotBeNegative))); order = value; } } public bool IsRequired { get { return isRequired; } set { isRequired = value; } } public bool EmitDefaultValue { get { return emitDefaultValue; } set { emitDefaultValue = value; } } } } // 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
- BuildProviderCollection.cs
- StateChangeEvent.cs
- ActivityBuilder.cs
- ToolboxDataAttribute.cs
- LineServicesCallbacks.cs
- Behavior.cs
- EntityDataSourceSelectingEventArgs.cs
- QilLoop.cs
- ComboBoxDesigner.cs
- ContentElement.cs
- ByteAnimation.cs
- CompilationLock.cs
- ArrayWithOffset.cs
- SchemaManager.cs
- TagPrefixAttribute.cs
- FileSecurity.cs
- WorkflowQueue.cs
- CellConstantDomain.cs
- XslAstAnalyzer.cs
- VariableQuery.cs
- PrintingPermission.cs
- TypeContext.cs
- BufferedGraphicsManager.cs
- DependencyObjectProvider.cs
- OleDbError.cs
- WebZoneDesigner.cs
- InvokeMethodActivityDesigner.cs
- WebPartConnectionsCancelEventArgs.cs
- EnumerableCollectionView.cs
- CodeMemberField.cs
- RequiredAttributeAttribute.cs
- MemberAccessException.cs
- FileSecurity.cs
- ISFTagAndGuidCache.cs
- ActivityCodeDomReferenceService.cs
- CollectionView.cs
- AuthenticateEventArgs.cs
- LocalizabilityAttribute.cs
- TextEditorParagraphs.cs
- XsltSettings.cs
- NamespaceEmitter.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- FigureHelper.cs
- NamespaceEmitter.cs
- HideDisabledControlAdapter.cs
- arabicshape.cs
- ParameterSubsegment.cs
- SchemaInfo.cs
- DbProviderFactoriesConfigurationHandler.cs
- OleDbInfoMessageEvent.cs
- Point.cs
- XmlSchemaObject.cs
- IERequestCache.cs
- ApplicationManager.cs
- UpdateException.cs
- FlowDocumentFormatter.cs
- TableCellCollection.cs
- ActivationArguments.cs
- GeometryConverter.cs
- DesignerInterfaces.cs
- UrlMapping.cs
- ApplicationProxyInternal.cs
- GenericsNotImplementedException.cs
- IssuedTokenClientBehaviorsElement.cs
- MobilePage.cs
- ForAllOperator.cs
- PassportIdentity.cs
- ProcessModule.cs
- ListViewSelectEventArgs.cs
- CodeDomConfigurationHandler.cs
- WebBrowserUriTypeConverter.cs
- EventWaitHandle.cs
- Win32Native.cs
- localization.cs
- CharacterBuffer.cs
- CompiledQuery.cs
- ISAPIWorkerRequest.cs
- PerformanceCounterCategory.cs
- RowSpanVector.cs
- ComboBox.cs
- RbTree.cs
- ExtensionQuery.cs
- SafeRightsManagementHandle.cs
- ExpressionBuilder.cs
- XPathBinder.cs
- WebHttpDispatchOperationSelector.cs
- BindingContext.cs
- AttachedAnnotationChangedEventArgs.cs
- DoubleStorage.cs
- TypeDelegator.cs
- WorkflowDesignerMessageFilter.cs
- Overlapped.cs
- TemplatedWizardStep.cs
- XsltArgumentList.cs
- CodeCatchClause.cs
- MenuRendererStandards.cs
- WebBrowser.cs
- VisualTreeUtils.cs
- BaseCodeDomTreeGenerator.cs
- HybridDictionary.cs