e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
68 lines
1.6 KiB
C#
68 lines
1.6 KiB
C#
//------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//------------------------------------------------------------
|
|
|
|
namespace System.Runtime.Serialization
|
|
{
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, Inherited = false, AllowMultiple = false)]
|
|
public sealed class DataContractAttribute : Attribute
|
|
{
|
|
string name;
|
|
string ns;
|
|
bool isNameSetExplicitly;
|
|
bool isNamespaceSetExplicitly;
|
|
bool isReference;
|
|
bool isReferenceSetExplicitly;
|
|
|
|
public DataContractAttribute()
|
|
{
|
|
}
|
|
|
|
public bool IsReference
|
|
{
|
|
get { return isReference; }
|
|
set
|
|
{
|
|
isReference = value;
|
|
isReferenceSetExplicitly = true;
|
|
}
|
|
}
|
|
|
|
public bool IsReferenceSetExplicitly
|
|
{
|
|
get { return isReferenceSetExplicitly; }
|
|
}
|
|
|
|
public string Namespace
|
|
{
|
|
get { return ns; }
|
|
set
|
|
{
|
|
ns = value;
|
|
isNamespaceSetExplicitly = true;
|
|
}
|
|
}
|
|
|
|
public bool IsNamespaceSetExplicitly
|
|
{
|
|
get { return isNamespaceSetExplicitly; }
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get { return name; }
|
|
set
|
|
{
|
|
name = value;
|
|
isNameSetExplicitly = true;
|
|
}
|
|
}
|
|
|
|
public bool IsNameSetExplicitly
|
|
{
|
|
get { return isNameSetExplicitly; }
|
|
}
|
|
|
|
}
|
|
}
|