Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c10b4bf

Browse files
committed
Add serialization primitives to mscorlib facade
1 parent f09a1f3 commit c10b4bf

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed

src/mscorlib/ref/mscorlib.cs

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,6 +2457,13 @@ public NotFiniteNumberException() { }
24572457
public NotFiniteNumberException(string message) { }
24582458
public NotFiniteNumberException(string message, System.Exception innerException) { }
24592459
}
2460+
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
2461+
public sealed class NonSerializedAttribute : Attribute
2462+
{
2463+
public NonSerializedAttribute()
2464+
{
2465+
}
2466+
}
24602467
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
24612468
public partial class NotImplementedException : System.SystemException
24622469
{
@@ -2739,6 +2746,13 @@ public partial struct SByte : System.IComparable, System.IComparable<sbyte>, Sys
27392746
[System.CLSCompliantAttribute(false)]
27402747
public static bool TryParse(string s, out sbyte result) { result = default(sbyte); return default(bool); }
27412748
}
2749+
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)]
2750+
public sealed class SerializableAttribute : Attribute
2751+
{
2752+
public SerializableAttribute()
2753+
{
2754+
}
2755+
}
27422756
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
27432757
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
27442758
public partial struct Single : System.IComparable, System.IComparable<float>, System.IConvertible, System.IEquatable<float>, System.IFormattable
@@ -11269,6 +11283,42 @@ public static partial class FormatterServices
1126911283
[System.Security.SecurityCriticalAttribute]
1127011284
public static object GetUninitializedObject(System.Type type) { return default(object); }
1127111285
}
11286+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11287+
public interface IDeserializationCallback
11288+
{
11289+
void OnDeserialization(object sender);
11290+
}
11291+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11292+
[System.CLSCompliant(false)]
11293+
public interface IFormatterConverter
11294+
{
11295+
object Convert(object value, Type type);
11296+
object Convert(object value, TypeCode typeCode);
11297+
bool ToBoolean(object value);
11298+
char ToChar(object value);
11299+
[CLSCompliant(false)]
11300+
sbyte ToSByte(object value);
11301+
byte ToByte(object value);
11302+
short ToInt16(object value);
11303+
[CLSCompliant(false)]
11304+
ushort ToUInt16(object value);
11305+
int ToInt32(object value);
11306+
[CLSCompliant(false)]
11307+
uint ToUInt32(object value);
11308+
long ToInt64(object value);
11309+
[CLSCompliant(false)]
11310+
ulong ToUInt64(object value);
11311+
float ToSingle(object value);
11312+
double ToDouble(object value);
11313+
Decimal ToDecimal(object value);
11314+
DateTime ToDateTime(object value);
11315+
String ToString(object value);
11316+
}
11317+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11318+
public interface ISerializable
11319+
{
11320+
void GetObjectData(SerializationInfo info, StreamingContext context);
11321+
}
1127211322
[System.AttributeUsageAttribute((System.AttributeTargets)(64), Inherited=false)]
1127311323
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
1127411324
public sealed partial class OnDeserializedAttribute : System.Attribute
@@ -11293,6 +11343,21 @@ public sealed partial class OnSerializingAttribute : System.Attribute
1129311343
{
1129411344
public OnSerializingAttribute() { }
1129511345
}
11346+
[System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited = false)]
11347+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11348+
public sealed partial class OptionalFieldAttribute : System.Attribute
11349+
{
11350+
public OptionalFieldAttribute() { }
11351+
public int VersionAdded { get { return default(int); } set { } }
11352+
}
11353+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
11354+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11355+
public struct SerializationEntry
11356+
{
11357+
public string Name { get { throw null; } }
11358+
public Type ObjectType { get { throw null; } }
11359+
public object Value { get { throw null; } }
11360+
}
1129611361
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
1129711362
public partial class SerializationException : System.SystemException
1129811363
{
@@ -11301,6 +11366,70 @@ public SerializationException(string message) { }
1130111366
public SerializationException(string message, System.Exception innerException) { }
1130211367
}
1130311368
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11369+
public sealed class SerializationInfo
11370+
{
11371+
[CLSCompliant(false)]
11372+
public SerializationInfo(Type type, IFormatterConverter converter) { }
11373+
public string AssemblyName { get { throw null; } set { } }
11374+
public string FullTypeName { get { throw null; } set { } }
11375+
public int MemberCount { get { throw null; } }
11376+
public Type ObjectType { get { throw null; } }
11377+
public void AddValue(string name, bool value) { }
11378+
public void AddValue(string name, byte value) { }
11379+
public void AddValue(string name, char value) { }
11380+
public void AddValue(string name, DateTime value) { }
11381+
public void AddValue(string name, decimal value) { }
11382+
public void AddValue(string name, double value) { }
11383+
public void AddValue(string name, short value) { }
11384+
public void AddValue(string name, int value) { }
11385+
public void AddValue(string name, long value) { }
11386+
public void AddValue(string name, object value) { }
11387+
public void AddValue(string name, object value, Type type) { }
11388+
[CLSCompliant(false)]
11389+
public void AddValue(string name, sbyte value) { }
11390+
public void AddValue(string name, float value) { }
11391+
[CLSCompliant(false)]
11392+
public void AddValue(string name, ushort value) { }
11393+
[CLSCompliant(false)]
11394+
public void AddValue(string name, uint value) { }
11395+
[CLSCompliant(false)]
11396+
public void AddValue(string name, ulong value) { }
11397+
public bool GetBoolean(string name) { throw null; }
11398+
public byte GetByte(string name) { throw null; }
11399+
public char GetChar(string name) { throw null; }
11400+
public DateTime GetDateTime(string name) { throw null; }
11401+
public decimal GetDecimal(string name) { throw null; }
11402+
public double GetDouble(string name) { throw null; }
11403+
public SerializationInfoEnumerator GetEnumerator() { throw null; }
11404+
public short GetInt16(string name) { throw null; }
11405+
public int GetInt32(string name) { throw null; }
11406+
public long GetInt64(string name) { throw null; }
11407+
[CLSCompliant(false)]
11408+
public sbyte GetSByte(string name) { throw null; }
11409+
public float GetSingle(string name) { throw null; }
11410+
public string GetString(string name) { throw null; }
11411+
[CLSCompliant(false)]
11412+
public ushort GetUInt16(string name) { throw null; }
11413+
[CLSCompliant(false)]
11414+
public uint GetUInt32(string name) { throw null; }
11415+
[CLSCompliant(false)]
11416+
public ulong GetUInt64(string name) { throw null; }
11417+
public object GetValue(string name, Type type) { throw null; }
11418+
public void SetType(Type type) { }
11419+
}
11420+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
11421+
public sealed class SerializationInfoEnumerator : System.Collections.IEnumerator
11422+
{
11423+
private SerializationInfoEnumerator() { }
11424+
public SerializationEntry Current { get { throw null; } }
11425+
public string Name { get { throw null; } }
11426+
public Type ObjectType { get { throw null; } }
11427+
object System.Collections.IEnumerator.Current { get { throw null; } }
11428+
public object Value { get { throw null; } }
11429+
public bool MoveNext() { throw null; }
11430+
public void Reset() { throw null; }
11431+
}
11432+
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
1130411433
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
1130511434
public partial struct StreamingContext
1130611435
{

0 commit comments

Comments
 (0)