This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5k
/
System.Runtime.Serialization.Formatters.cs
139 lines (130 loc) · 5.52 KB
/
System.Runtime.Serialization.Formatters.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
using System;
using System.Collections;
namespace System
{
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class NonSerializedAttribute : Attribute
{
public NonSerializedAttribute()
{
}
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)]
public sealed class SerializableAttribute : Attribute
{
public SerializableAttribute()
{
}
}
}
namespace System.Runtime.Serialization
{
[CLSCompliant(false)]
public interface IFormatterConverter
{
object Convert(object value, Type type);
object Convert(object value, TypeCode typeCode);
bool ToBoolean(object value);
char ToChar(object value);
[CLSCompliant(false)]
sbyte ToSByte(object value);
byte ToByte(object value);
short ToInt16(object value);
[CLSCompliant(false)]
ushort ToUInt16(object value);
int ToInt32(object value);
[CLSCompliant(false)]
uint ToUInt32(object value);
long ToInt64(object value);
[CLSCompliant(false)]
ulong ToUInt64(object value);
float ToSingle(object value);
double ToDouble(object value);
Decimal ToDecimal(object value);
DateTime ToDateTime(object value);
String ToString(object value);
}
public interface ISerializable
{
void GetObjectData(SerializationInfo info, StreamingContext context);
}
public interface IDeserializationCallback
{
void OnDeserialization(object sender);
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public struct SerializationEntry
{
public string Name { get { throw null; } }
public Type ObjectType { get { throw null; } }
public object Value { get { throw null; } }
}
public sealed class SerializationInfo
{
[CLSCompliant(false)]
public SerializationInfo(Type type, IFormatterConverter converter) { }
public string AssemblyName { get { throw null; } set { } }
public string FullTypeName { get { throw null; } set { } }
public int MemberCount { get { throw null; } }
public Type ObjectType { get { throw null; } }
public void AddValue(string name, bool value) { }
public void AddValue(string name, byte value) { }
public void AddValue(string name, char value) { }
public void AddValue(string name, DateTime value) { }
public void AddValue(string name, decimal value) { }
public void AddValue(string name, double value) { }
public void AddValue(string name, short value) { }
public void AddValue(string name, int value) { }
public void AddValue(string name, long value) { }
public void AddValue(string name, object value) { }
public void AddValue(string name, object value, Type type) { }
[CLSCompliant(false)]
public void AddValue(string name, sbyte value) { }
public void AddValue(string name, float value) { }
[CLSCompliant(false)]
public void AddValue(string name, ushort value) { }
[CLSCompliant(false)]
public void AddValue(string name, uint value) { }
[CLSCompliant(false)]
public void AddValue(string name, ulong value) { }
public bool GetBoolean(string name) { throw null; }
public byte GetByte(string name) { throw null; }
public char GetChar(string name) { throw null; }
public DateTime GetDateTime(string name) { throw null; }
public decimal GetDecimal(string name) { throw null; }
public double GetDouble(string name) { throw null; }
public SerializationInfoEnumerator GetEnumerator() { throw null; }
public short GetInt16(string name) { throw null; }
public int GetInt32(string name) { throw null; }
public long GetInt64(string name) { throw null; }
[CLSCompliant(false)]
public sbyte GetSByte(string name) { throw null; }
public float GetSingle(string name) { throw null; }
public string GetString(string name) { throw null; }
[CLSCompliant(false)]
public ushort GetUInt16(string name) { throw null; }
[CLSCompliant(false)]
public uint GetUInt32(string name) { throw null; }
[CLSCompliant(false)]
public ulong GetUInt64(string name) { throw null; }
public object GetValue(string name, Type type) { throw null; }
public void SetType(Type type) { }
}
public sealed class SerializationInfoEnumerator : IEnumerator
{
private SerializationInfoEnumerator() { }
public SerializationEntry Current { get { throw null; } }
public string Name { get { throw null; } }
public Type ObjectType { get { throw null; } }
object System.Collections.IEnumerator.Current { get { throw null; } }
public object Value { get { throw null; } }
public bool MoveNext() { throw null; }
public void Reset() { throw null; }
}
}