mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Added type enumeration
This commit is contained in:
parent
dad51be5d6
commit
121e5b9b06
3 changed files with 28 additions and 2 deletions
|
@ -35,6 +35,14 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Enumerator Types
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return .();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int32 Size
|
public int32 Size
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -461,6 +469,24 @@ namespace System
|
||||||
{
|
{
|
||||||
return FieldInfo.Enumerator(null, bindingFlags);
|
return FieldInfo.Enumerator(null, bindingFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct Enumerator : IEnumerator<Type>
|
||||||
|
{
|
||||||
|
int32 mCurId;
|
||||||
|
|
||||||
|
public Result<Type> GetNext() mut
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (mCurId >= sTypeCount)
|
||||||
|
return .Err;
|
||||||
|
let type = sTypes[mCurId++];
|
||||||
|
if (type != null)
|
||||||
|
return .Ok(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TypeCode : uint8
|
enum TypeCode : uint8
|
||||||
|
|
|
@ -48,7 +48,7 @@ OtherLinkFlags = ""
|
||||||
TargetDirectory = "$(WorkspaceDir)/dist"
|
TargetDirectory = "$(WorkspaceDir)/dist"
|
||||||
TargetName = "BeefIDE_d2"
|
TargetName = "BeefIDE_d2"
|
||||||
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib BeefySysLib64_d.lib wsock32.lib"
|
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib BeefySysLib64_d.lib wsock32.lib"
|
||||||
DebugCommandArguments = "-workspace=C:\\Beef\\IDEHelper\\Tests"
|
DebugCommandArguments = "-workspace=C:\\Beef\\IDE\\mintest"
|
||||||
DebugWorkingDirectory = "$(ProjectDir)\\dist"
|
DebugWorkingDirectory = "$(ProjectDir)\\dist"
|
||||||
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,6 @@
|
||||||
<LocalDebuggerEnvironment>_NO_DEBUG_HEAP=1</LocalDebuggerEnvironment>
|
<LocalDebuggerEnvironment>_NO_DEBUG_HEAP=1</LocalDebuggerEnvironment>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ShowAllFiles>false</ShowAllFiles>
|
<ShowAllFiles>true</ShowAllFiles>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue