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

Commit 87ca813

Browse files
hughbecston
authored andcommitted
Port Microsoft.VisualBasic.CompilerServices.Conversions
1 parent cbab8d9 commit 87ca813

File tree

5 files changed

+2576
-1025
lines changed

5 files changed

+2576
-1025
lines changed

src/Microsoft.VisualBasic/ref/Microsoft.VisualBasic.cs

+62-26
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// Changes to this file must follow the http://aka.ms/api-review process.
66
// ------------------------------------------------------------------------------
77

8-
using System;
9-
108
namespace Microsoft.VisualBasic
119
{
1210
public enum CallType
@@ -46,11 +44,6 @@ void System.Collections.IList.RemoveAt(int index) { }
4644
public void Remove(int Index) { }
4745
public void Remove(string Key) { }
4846
}
49-
public enum CompareMethod
50-
{
51-
Binary = 0,
52-
Text = 1,
53-
}
5447
[System.AttributeUsageAttribute((System.AttributeTargets)(4), Inherited=false, AllowMultiple=false)]
5548
public sealed partial class ComClassAttribute : System.Attribute
5649
{
@@ -63,11 +56,17 @@ public ComClassAttribute(string _ClassID, string _InterfaceID, string _EventId)
6356
public string InterfaceID { get { throw null; } }
6457
public bool InterfaceShadows { get { throw null; } set { } }
6558
}
59+
public enum CompareMethod
60+
{
61+
Binary = 0,
62+
Text = 1,
63+
}
6664
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
6765
public sealed partial class Constants
6866
{
6967
internal Constants() { }
7068
public const string vbBack = "\b";
69+
public const Microsoft.VisualBasic.CompareMethod vbBinaryCompare = Microsoft.VisualBasic.CompareMethod.Binary;
7170
public const string vbCr = "\r";
7271
public const string vbCrLf = "\r\n";
7372
public const string vbFormFeed = "\f";
@@ -77,9 +76,8 @@ internal Constants() { }
7776
public const string vbNullChar = "\0";
7877
public const string vbNullString = null;
7978
public const string vbTab = "\t";
79+
public const Microsoft.VisualBasic.CompareMethod vbTextCompare = Microsoft.VisualBasic.CompareMethod.Text;
8080
public const string vbVerticalTab = "\v";
81-
public const CompareMethod vbBinaryCompare = CompareMethod.Binary;
82-
public const CompareMethod vbTextCompare = CompareMethod.Text;
8381
}
8482
public sealed partial class ControlChars
8583
{
@@ -99,25 +97,15 @@ public ControlChars() { }
9997
public sealed partial class DateAndTime
10098
{
10199
internal DateAndTime() { }
102-
public static DateTime Now { get; }
103-
public static DateTime Today { get; }
100+
public static System.DateTime Now { get { throw null; } }
101+
public static System.DateTime Today { get { throw null; } }
104102
}
105103
[System.AttributeUsageAttribute((System.AttributeTargets)(4), AllowMultiple=false, Inherited=false)]
106104
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
107105
public sealed partial class HideModuleNameAttribute : System.Attribute
108106
{
109107
public HideModuleNameAttribute() { }
110108
}
111-
[System.AttributeUsageAttribute((System.AttributeTargets)(4), AllowMultiple=false, Inherited=false)]
112-
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(2))]
113-
public sealed partial class MyGroupCollectionAttribute : System.Attribute
114-
{
115-
public MyGroupCollectionAttribute(string typeToCollect, string createInstanceMethodName, string disposeInstanceMethodName, string defaultInstanceAlias) { }
116-
public string CreateMethod { get { throw null; } }
117-
public string DefaultInstanceAlias { get { throw null; } }
118-
public string DisposeMethod { get { throw null; } }
119-
public string MyGroupName { get { throw null; } }
120-
}
121109
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
122110
public sealed partial class Information
123111
{
@@ -134,9 +122,19 @@ internal Information() { }
134122
public static int RGB(int Red, int Green, int Blue) { throw null; }
135123
public static string SystemTypeName(string VbName) { throw null; }
136124
public static int UBound(System.Array Array, int Rank = 1) { throw null; }
137-
public static VariantType VarType(object VarName) { throw null; }
125+
public static Microsoft.VisualBasic.VariantType VarType(object VarName) { throw null; }
138126
public static string VbTypeName(string UrtName) { throw null; }
139127
}
128+
[System.AttributeUsageAttribute((System.AttributeTargets)(4), AllowMultiple=false, Inherited=false)]
129+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(2))]
130+
public sealed partial class MyGroupCollectionAttribute : System.Attribute
131+
{
132+
public MyGroupCollectionAttribute(string typeToCollect, string createInstanceMethodName, string disposeInstanceMethodName, string defaultInstanceAlias) { }
133+
public string CreateMethod { get { throw null; } }
134+
public string DefaultInstanceAlias { get { throw null; } }
135+
public string DisposeMethod { get { throw null; } }
136+
public string MyGroupName { get { throw null; } }
137+
}
140138
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
141139
public sealed partial class Strings
142140
{
@@ -147,8 +145,8 @@ internal Strings() { }
147145
public static int AscW(string String) { throw null; }
148146
public static char Chr(int CharCode) { throw null; }
149147
public static char ChrW(int CharCode) { throw null; }
150-
public static string[] Filter(object[] Source, string Match, bool Include = true, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute] CompareMethod Compare = CompareMethod.Binary) { throw null; }
151-
public static string[] Filter(string[] Source, string Match, bool Include = true, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute] CompareMethod Compare = CompareMethod.Binary) { throw null; }
148+
public static string[] Filter(object[] Source, string Match, bool Include = true, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = (Microsoft.VisualBasic.CompareMethod)(0)) { throw null; }
149+
public static string[] Filter(string[] Source, string Match, bool Include = true, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = (Microsoft.VisualBasic.CompareMethod)(0)) { throw null; }
152150
public static string Left(string str, int Length) { throw null; }
153151
public static string LTrim(string str) { throw null; }
154152
public static string Mid(string str, int Start) { throw null; }
@@ -232,6 +230,11 @@ public sealed partial class Conversions
232230
{
233231
internal Conversions() { }
234232
public static object ChangeType(object Expression, System.Type TargetType) { throw null; }
233+
[System.ObsoleteAttribute("do not use this method", true)]
234+
public static object FallbackUserDefinedConversion(object Expression, System.Type TargetType) { throw null; }
235+
public static string FromCharAndCount(char Value, int Count) { throw null; }
236+
public static string FromCharArray(char[] Value) { throw null; }
237+
public static string FromCharArraySubset(char[] Value, int StartIndex, int Length) { throw null; }
235238
public static bool ToBoolean(object Value) { throw null; }
236239
public static bool ToBoolean(string Value) { throw null; }
237240
public static byte ToByte(object Value) { throw null; }
@@ -265,12 +268,15 @@ internal Conversions() { }
265268
public static string ToString(char Value) { throw null; }
266269
public static string ToString(System.DateTime Value) { throw null; }
267270
public static string ToString(decimal Value) { throw null; }
271+
public static string ToString(decimal Value, System.Globalization.NumberFormatInfo NumberFormat) { throw null; }
268272
public static string ToString(double Value) { throw null; }
273+
public static string ToString(double Value, System.Globalization.NumberFormatInfo NumberFormat) { throw null; }
269274
public static string ToString(short Value) { throw null; }
270275
public static string ToString(int Value) { throw null; }
271276
public static string ToString(long Value) { throw null; }
272277
public static string ToString(object Value) { throw null; }
273278
public static string ToString(float Value) { throw null; }
279+
public static string ToString(float Value, System.Globalization.NumberFormatInfo NumberFormat) { throw null; }
274280
[System.CLSCompliantAttribute(false)]
275281
public static string ToString(uint Value) { throw null; }
276282
[System.CLSCompliantAttribute(false)]
@@ -292,8 +298,8 @@ internal Conversions() { }
292298
public sealed partial class BooleanType
293299
{
294300
internal BooleanType() { }
295-
public static Boolean FromObject(object Value) { throw null; }
296-
public static Boolean FromString(string Value) { throw null; }
301+
public static System.Boolean FromObject(object Value) { throw null; }
302+
public static System.Boolean FromString(string Value) { throw null; }
297303
}
298304
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
299305
public sealed partial class DecimalType
@@ -332,8 +338,36 @@ public IncompleteInitialization() { }
332338
public sealed partial class NewLateBinding
333339
{
334340
internal NewLateBinding() { }
341+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
342+
[System.ObsoleteAttribute("do not use this method", true)]
343+
public static object FallbackCall(object Instance, string MemberName, object[] Arguments, string[] ArgumentNames, bool IgnoreReturn) { throw null; }
344+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
345+
[System.ObsoleteAttribute("do not use this method", true)]
346+
public static object FallbackGet(object Instance, string MemberName, object[] Arguments, string[] ArgumentNames) { throw null; }
347+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
348+
[System.ObsoleteAttribute("do not use this method", true)]
349+
public static void FallbackIndexSet(object Instance, object[] Arguments, string[] ArgumentNames) { }
350+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
351+
[System.ObsoleteAttribute("do not use this method", true)]
352+
public static void FallbackIndexSetComplex(object Instance, object[] Arguments, string[] ArgumentNames, bool OptimisticSet, bool RValueBase) { }
353+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
354+
[System.ObsoleteAttribute("do not use this method", true)]
355+
public static object FallbackInvokeDefault1(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { throw null; }
356+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
357+
[System.ObsoleteAttribute("do not use this method", true)]
358+
public static object FallbackInvokeDefault2(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { throw null; }
359+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
360+
[System.ObsoleteAttribute("do not use this method", true)]
361+
public static void FallbackSet(object Instance, string MemberName, object[] Arguments) { }
362+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
363+
[System.ObsoleteAttribute("do not use this method", true)]
364+
public static void FallbackSetComplex(object Instance, string MemberName, object[] Arguments, bool OptimisticSet, bool RValueBase) { }
335365
public static object LateCall(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments, bool[] CopyBack, bool IgnoreReturn) { throw null; }
366+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
367+
public static object LateCallInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { throw null; }
336368
public static object LateGet(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments, bool[] CopyBack) { throw null; }
369+
[System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))]
370+
public static object LateGetInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { throw null; }
337371
public static object LateIndexGet(object Instance, object[] Arguments, string[] ArgumentNames) { throw null; }
338372
public static void LateIndexSet(object Instance, object[] Arguments, string[] ArgumentNames) { }
339373
public static void LateIndexSetComplex(object Instance, object[] Arguments, string[] ArgumentNames, bool OptimisticSet, bool RValueBase) { }
@@ -379,6 +413,8 @@ internal Operators() { }
379413
public static bool ConditionalCompareObjectNotEqual(object Left, object Right, bool TextCompare) { throw null; }
380414
public static object DivideObject(object Left, object Right) { throw null; }
381415
public static object ExponentObject(object Left, object Right) { throw null; }
416+
[System.ObsoleteAttribute("do not use this method", true)]
417+
public static object FallbackInvokeUserDefinedOperator(object vbOp, object[] arguments) { throw null; }
382418
public static object IntDivideObject(object Left, object Right) { throw null; }
383419
public static object LeftShiftObject(object Operand, object Amount) { throw null; }
384420
public static object ModObject(object Left, object Right) { throw null; }

0 commit comments

Comments
 (0)