зеркало из https://github.com/mono/corefx.git
Revert "Scale back [Serializable] CoreFX types (#19742)"
This reverts commit 6dd451f514
.
This commit is contained in:
Родитель
a50d8c8115
Коммит
e49886bd09
|
@ -19,7 +19,7 @@
|
|||
<Rule Id="CA2229" Action="Error" /> <!-- Serializable type doesn't have a serialization constructor -->
|
||||
<Rule Id="CA2235" Action="None" /> <!-- Serializable type has non serializable field -->
|
||||
<Rule Id="CA2231" Action="None" /> <!-- Overload operator equals when overriding ValueType.Equals -->
|
||||
<Rule Id="CA2237" Action="None" /> <!-- Add [Serializable] to types that implement ISerializable -->
|
||||
<Rule Id="CA2237" Action="Error" /> <!-- Add [Serializable] to types that implement ISerializable -->
|
||||
|
||||
<Rule Id="CA2200" Action="None"/> <!-- Rethrowing caught exception changes stack information -->
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace System.CodeDom
|
|||
namespace System.Runtime.Serialization
|
||||
#endif
|
||||
{
|
||||
[Serializable]
|
||||
#if !FEATURE_SERIALIZATION
|
||||
public class CodeObject
|
||||
#else
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace System.Runtime.Serialization
|
|||
GenericTypeParameter = 0x00000002
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
#if !FEATURE_SERIALIZATION
|
||||
public class CodeTypeReference : CodeObject
|
||||
#else
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace System.CodeDom
|
|||
namespace System.Runtime.Serialization
|
||||
#endif
|
||||
{
|
||||
[Serializable]
|
||||
#if !FEATURE_SERIALIZATION
|
||||
public class CodeTypeReferenceCollection : CollectionBase
|
||||
#else
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace System.Collections
|
||||
{
|
||||
[Serializable]
|
||||
internal sealed class CompatibleComparer : IEqualityComparer
|
||||
{
|
||||
private readonly IHashCodeProvider _hcp;
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Runtime.Serialization;
|
|||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
[Serializable]
|
||||
internal sealed class NameValuePair
|
||||
{
|
||||
readonly private string _name;
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace System.Net.NetworkInformation
|
|||
/// Provides NetworkInformation exceptions to the application.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
[Serializable]
|
||||
public class NetworkInformationException : Win32Exception
|
||||
{
|
||||
/// <devdoc>
|
||||
|
|
|
@ -8,6 +8,7 @@ using System.Diagnostics;
|
|||
|
||||
namespace System.Text
|
||||
{
|
||||
[Serializable]
|
||||
internal sealed class DecoderDBCS : Decoder
|
||||
{
|
||||
private readonly Encoding _encoding;
|
||||
|
|
|
@ -8,6 +8,7 @@ using System.Diagnostics;
|
|||
|
||||
namespace System.Text
|
||||
{
|
||||
[Serializable]
|
||||
internal sealed class OSEncoder : Encoder
|
||||
{
|
||||
private char _charLeftOver;
|
||||
|
|
|
@ -9,6 +9,7 @@ using System.Diagnostics.Contracts;
|
|||
|
||||
namespace System.Text
|
||||
{
|
||||
[Serializable]
|
||||
internal sealed class OSEncoding : Encoding
|
||||
{
|
||||
private readonly int _codePage;
|
||||
|
|
|
@ -15,13 +15,6 @@ namespace System.Collections.Tests
|
|||
public void IGenericSharedAPI_SerializeDeserialize(int count)
|
||||
{
|
||||
IEnumerable<T> expected = GenericIEnumerableFactory(count);
|
||||
|
||||
// Not all IEnumerables are intended to be Serializable
|
||||
if (!expected.GetType().IsSerializable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IEnumerable<T> actual = BinaryFormatterHelpers.Clone(expected);
|
||||
|
||||
if (Order == EnumerableOrder.Sequential)
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace Microsoft.CSharp.RuntimeBinder
|
|||
/// <see cref="RuntimeBinderException"/> represents a failure to bind in the sense of a usual compiler error, whereas <see cref="RuntimeBinderInternalCompilerException"/>
|
||||
/// represents a malfunctioning of the runtime binder itself.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RuntimeBinderException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace Microsoft.CSharp.RuntimeBinder
|
|||
/// <see cref="RuntimeBinderException"/> represents a failure to bind in the sense of a usual compiler error, whereas <see cref="RuntimeBinderInternalCompilerException"/>
|
||||
/// represents a malfunctioning of the runtime binder itself.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RuntimeBinderInternalCompilerException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Tests
|
|||
Assert.Empty(rbe.Data);
|
||||
Assert.True((rbe.HResult & 0xFFFF0000) == 0x80130000); // Error from .NET
|
||||
Assert.Contains(rbe.GetType().FullName, rbe.Message); // Localized, but should contain type name.
|
||||
BinaryFormatterHelpers.AssertRoundtrips(rbe);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -33,6 +34,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Tests
|
|||
Assert.Same(message, rbe.Message);
|
||||
rbe = new RuntimeBinderException(null);
|
||||
Assert.Equal(new RuntimeBinderException().Message, rbe.Message);
|
||||
BinaryFormatterHelpers.AssertRoundtrips(rbe);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,6 +45,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Tests
|
|||
Exception inner = new Exception("This is a test exception");
|
||||
RuntimeBinderException rbe = new RuntimeBinderException(message, inner);
|
||||
Assert.Same(inner, rbe.InnerException);
|
||||
BinaryFormatterHelpers.AssertRoundtrips(rbe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Tests
|
|||
Assert.Empty(rbe.Data);
|
||||
Assert.True((rbe.HResult & 0xFFFF0000) == 0x80130000); // Error from .NET
|
||||
Assert.Contains(rbe.GetType().FullName, rbe.Message); // Localized, but should contain type name.
|
||||
BinaryFormatterHelpers.AssertRoundtrips(rbe);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -31,6 +32,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Tests
|
|||
Assert.Same(message, rbe.Message);
|
||||
rbe = new RuntimeBinderInternalCompilerException(null);
|
||||
Assert.Equal(new RuntimeBinderInternalCompilerException().Message, rbe.Message);
|
||||
BinaryFormatterHelpers.AssertRoundtrips(rbe);
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,6 +43,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Tests
|
|||
Exception inner = new Exception("This is a test exception");
|
||||
RuntimeBinderInternalCompilerException rbe = new RuntimeBinderInternalCompilerException(message, inner);
|
||||
Assert.Same(inner, rbe.InnerException);
|
||||
BinaryFormatterHelpers.AssertRoundtrips(rbe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace System.ComponentModel
|
|||
/// <devdoc>
|
||||
/// <para>The exception that is thrown for a Win32 error code.</para>
|
||||
/// </devdoc>
|
||||
[Serializable]
|
||||
public partial class Win32Exception : ExternalException, ISerializable
|
||||
{
|
||||
/// <devdoc>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeArgumentReferenceExpression : CodeExpression
|
||||
{
|
||||
private string _parameterName;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeArrayCreateExpression : CodeExpression
|
||||
{
|
||||
private readonly CodeExpressionCollection _initializers = new CodeExpressionCollection();
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeArrayIndexerExpression : CodeExpression
|
||||
{
|
||||
private CodeExpressionCollection _indices;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeAssignStatement : CodeStatement
|
||||
{
|
||||
public CodeAssignStatement() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeAttachEventStatement : CodeStatement
|
||||
{
|
||||
private CodeEventReferenceExpression _eventRef;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeAttributeArgument
|
||||
{
|
||||
private string _name;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeAttributeArgumentCollection : CollectionBase
|
||||
{
|
||||
public CodeAttributeArgumentCollection() { }
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeAttributeDeclaration
|
||||
{
|
||||
private string _name;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeAttributeDeclarationCollection : CollectionBase
|
||||
{
|
||||
public CodeAttributeDeclarationCollection()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeBaseReferenceExpression : CodeExpression
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeBinaryOperatorExpression : CodeExpression
|
||||
{
|
||||
public CodeBinaryOperatorExpression() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeCastExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _targetType;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeCatchClause
|
||||
{
|
||||
private CodeStatementCollection _statements;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeCatchClauseCollection : CollectionBase
|
||||
{
|
||||
public CodeCatchClauseCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeChecksumPragma : CodeDirective
|
||||
{
|
||||
private string _fileName;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeComment : CodeObject
|
||||
{
|
||||
private string _text;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeCommentStatement : CodeStatement
|
||||
{
|
||||
public CodeCommentStatement() { }
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeCommentStatementCollection : CollectionBase
|
||||
{
|
||||
public CodeCommentStatementCollection() { }
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections.Specialized;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeCompileUnit : CodeObject
|
||||
{
|
||||
private StringCollection _assemblies = null;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeConditionStatement : CodeStatement
|
||||
{
|
||||
public CodeConditionStatement() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeConstructor : CodeMemberMethod
|
||||
{
|
||||
public CodeConstructor()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeDefaultValueExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeDelegateCreateExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _delegateType;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeDelegateInvokeExpression : CodeExpression
|
||||
{
|
||||
public CodeDelegateInvokeExpression() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeDirectionExpression : CodeExpression
|
||||
{
|
||||
public CodeDirectionExpression() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeDirective : CodeObject
|
||||
{
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeDirectiveCollection : CollectionBase
|
||||
{
|
||||
public CodeDirectiveCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeEntryPointMethod : CodeMemberMethod
|
||||
{
|
||||
public CodeEntryPointMethod() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeEventReferenceExpression : CodeExpression
|
||||
{
|
||||
private string _eventName;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeExpression : CodeObject
|
||||
{
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeExpressionCollection : CollectionBase
|
||||
{
|
||||
public CodeExpressionCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeExpressionStatement : CodeStatement
|
||||
{
|
||||
public CodeExpressionStatement() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeFieldReferenceExpression : CodeExpression
|
||||
{
|
||||
private string _fieldName;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeGotoStatement : CodeStatement
|
||||
{
|
||||
private string _label;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeIndexerExpression : CodeExpression
|
||||
{
|
||||
private CodeExpressionCollection _indices;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeIterationStatement : CodeStatement
|
||||
{
|
||||
public CodeIterationStatement() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeLabeledStatement : CodeStatement
|
||||
{
|
||||
private string _label;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeLinePragma
|
||||
{
|
||||
private string _fileName;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMemberEvent : CodeTypeMember
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMemberField : CodeTypeMember
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMemberMethod : CodeTypeMember
|
||||
{
|
||||
private readonly CodeParameterDeclarationExpressionCollection _parameters = new CodeParameterDeclarationExpressionCollection();
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMemberProperty : CodeTypeMember
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMethodInvokeExpression : CodeExpression
|
||||
{
|
||||
private CodeMethodReferenceExpression _method;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMethodReturnStatement : CodeStatement
|
||||
{
|
||||
public CodeMethodReturnStatement() { }
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Runtime.Serialization;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeNamespace : CodeObject
|
||||
{
|
||||
private string _name;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeNamespaceCollection : CollectionBase
|
||||
{
|
||||
public CodeNamespaceCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeNamespaceImport : CodeObject
|
||||
{
|
||||
private string _nameSpace;
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Collections.Generic;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeNamespaceImportCollection : IList
|
||||
{
|
||||
private readonly ArrayList _data = new ArrayList(); // not List<CodeNamespaceImport> to provide desktop-consistent semantics for CopyTo
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeObjectCreateExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _createType;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeParameterDeclarationExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeParameterDeclarationExpressionCollection : CollectionBase
|
||||
{
|
||||
public CodeParameterDeclarationExpressionCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodePrimitiveExpression : CodeExpression
|
||||
{
|
||||
public CodePrimitiveExpression() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodePropertyReferenceExpression : CodeExpression
|
||||
{
|
||||
private string _propertyName;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodePropertySetValueReferenceExpression : CodeExpression
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeRegionDirective : CodeDirective
|
||||
{
|
||||
private string _regionText;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeRemoveEventStatement : CodeStatement
|
||||
{
|
||||
private CodeEventReferenceExpression _eventRef;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeSnippetCompileUnit : CodeCompileUnit
|
||||
{
|
||||
private string _value;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeSnippetExpression : CodeExpression
|
||||
{
|
||||
private string _value;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeSnippetStatement : CodeStatement
|
||||
{
|
||||
private string _value;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeSnippetTypeMember : CodeTypeMember
|
||||
{
|
||||
private string _text;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeStatement : CodeObject
|
||||
{
|
||||
private CodeDirectiveCollection _startDirectives = null;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeStatementCollection : CollectionBase
|
||||
{
|
||||
public CodeStatementCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeThisReferenceExpression : CodeExpression
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeThrowExceptionStatement : CodeStatement
|
||||
{
|
||||
public CodeThrowExceptionStatement() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTryCatchFinallyStatement : CodeStatement
|
||||
{
|
||||
public CodeTryCatchFinallyStatement() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeConstructor : CodeMemberMethod
|
||||
{
|
||||
public CodeTypeConstructor()
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Reflection;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeDeclaration : CodeTypeMember
|
||||
{
|
||||
private readonly CodeTypeReferenceCollection _baseTypes = new CodeTypeReferenceCollection();
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeDeclarationCollection : CollectionBase
|
||||
{
|
||||
public CodeTypeDeclarationCollection() { }
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Reflection;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeDelegate : CodeTypeDeclaration
|
||||
{
|
||||
private CodeTypeReference _returnType;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeMember : CodeObject
|
||||
{
|
||||
private string _name;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeMemberCollection : CollectionBase
|
||||
{
|
||||
public CodeTypeMemberCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeOfExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeParameter : CodeObject
|
||||
{
|
||||
private string _name;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeParameterCollection : CollectionBase
|
||||
{
|
||||
public CodeTypeParameterCollection() { }
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeTypeReferenceExpression : CodeExpression
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeVariableDeclarationStatement : CodeStatement
|
||||
{
|
||||
private CodeTypeReference _type;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeVariableReferenceExpression : CodeExpression
|
||||
{
|
||||
private string _variableName;
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Globalization;
|
|||
|
||||
namespace System.CodeDom.Compiler
|
||||
{
|
||||
[Serializable]
|
||||
public class CompilerError
|
||||
{
|
||||
public CompilerError() : this(string.Empty, 0, 0, string.Empty, string.Empty) { }
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
|
||||
namespace System.CodeDom.Compiler
|
||||
{
|
||||
[Serializable]
|
||||
public class CompilerErrorCollection : CollectionBase
|
||||
{
|
||||
public CompilerErrorCollection() { }
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections.Specialized;
|
|||
|
||||
namespace System.CodeDom.Compiler
|
||||
{
|
||||
[Serializable]
|
||||
public partial class CompilerParameters
|
||||
{
|
||||
private readonly StringCollection _assemblyNames = new StringCollection();
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Reflection;
|
|||
|
||||
namespace System.CodeDom.Compiler
|
||||
{
|
||||
[Serializable]
|
||||
public partial class CompilerResults
|
||||
{
|
||||
private readonly CompilerErrorCollection _errors = new CompilerErrorCollection();
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace System.CodeDom
|
||||
{
|
||||
[Serializable]
|
||||
public class CodeMethodReferenceExpression : CodeExpression
|
||||
{
|
||||
private string _methodName;
|
||||
|
|
|
@ -121,6 +121,12 @@ namespace System.CodeDom.Tests
|
|||
Console.WriteLine(code);
|
||||
throw;
|
||||
}
|
||||
|
||||
// Serialize and deserialize the CodeObject, and make sure code generated for it
|
||||
// is the same as the original.
|
||||
CodeObject clone = BinaryFormatterHelpers.Clone(c);
|
||||
string cloneCode = GenerateCode(clone, provider);
|
||||
Assert.Equal(code, cloneCode);
|
||||
}
|
||||
|
||||
private static string GenerateCode(CodeObject c, CodeDomProvider provider)
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace System.Collections.Concurrent
|
|||
/// </remarks>
|
||||
[DebuggerTypeProxy(typeof(IProducerConsumerCollectionDebugView<>))]
|
||||
[DebuggerDisplay("Count = {Count}")]
|
||||
[Serializable]
|
||||
public class ConcurrentBag<T> : IProducerConsumerCollection<T>, IReadOnlyCollection<T>
|
||||
{
|
||||
/// <summary>The per-bag, per-thread work-stealing queues.</summary>
|
||||
|
@ -1049,6 +1050,7 @@ namespace System.Collections.Concurrent
|
|||
/// we use a custom enumerator rather than just returning array's. This enumerator provides
|
||||
/// the essential elements of both list's and array's enumerators.
|
||||
/// </remarks>
|
||||
[Serializable]
|
||||
private sealed class Enumerator : IEnumerator<T>
|
||||
{
|
||||
private readonly T[] _array;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче