本文整理汇总了C#中FOS_System类的典型用法代码示例。如果您正苦于以下问题:C# FOS_System类的具体用法?C# FOS_System怎么用?C# FOS_System使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FOS_System类属于命名空间,在下文中一共展示了FOS_System类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateProcess
public static Process CreateProcess(ThreadStartMethod MainMethod, FOS_System.String Name, bool UserMode, bool CreateHeap)
{
#if PROCESSMANAGER_TRACE
BasicConsole.WriteLine("Creating process object...");
#endif
return new Process(MainMethod, ProcessIdGenerator++, Name, UserMode, CreateHeap);
}
示例2: Find
/// <summary>
/// Attempts to find the specified directory within any file system.
/// </summary>
/// <param name="directoryName">The full path and name of the directory to find.</param>
/// <returns>The directory or null if it isn't found.</returns>
public static Directory Find(FOS_System.String directoryName)
{
FileSystemMapping theMapping = FileSystemManager.GetMapping(directoryName);
if (theMapping == null)
{
return null;
}
directoryName = theMapping.RemoveMappingPrefix(directoryName);
directoryName = directoryName.ToUpper();
Base baseListing = theMapping.TheFileSystem.GetListing(directoryName);
if (baseListing == null)
{
return null;
}
else
{
if (baseListing is Directory)
{
return (Directory)baseListing;
}
else
{
return null;
}
}
}
示例3: Open
/// <summary>
/// Opens the specified file.
/// </summary>
/// <param name="fileName">The full path to the file to open.</param>
/// <returns>The file listing or null if not found.</returns>
public static File Open(FOS_System.String fileName)
{
FileSystemMapping theMapping = FileSystemManager.GetMapping(fileName);
if(theMapping == null)
{
return null;
}
fileName = theMapping.RemoveMappingPrefix(fileName);
fileName = fileName.ToUpper();
Base baseListing = theMapping.TheFileSystem.GetListing(fileName);
if (baseListing == null)
{
return null;
}
else
{
if (baseListing is File)
{
return (File)baseListing;
}
else
{
return null;
}
}
}
示例4: Base
/// <summary>
/// Initializes a new base listing.
/// </summary>
/// <param name="aFileSystem">The file system to which the listing belongs.</param>
/// <param name="parent">The parent directory of the listing.</param>
/// <param name="aName">The name of the listing.</param>
/// <param name="isDirectory">Whether the listing is a directory or not.</param>
protected Base(FileSystem aFileSystem, Directory parent, FOS_System.String aName, bool isDirectory)
{
TheFileSystem = aFileSystem;
Name = aName;
IsDirectory = isDirectory;
Parent = parent;
}
示例5: AddDeviceAddedListener
public static void AddDeviceAddedListener(DeviceAddedHandler aHandler, FOS_System.Object aState)
{
DeviceAddedListeners.Add(new DeviceAddedListener()
{
handler = aHandler,
state = aState
});
}
示例6: GetASCIIBytes
public static byte[] GetASCIIBytes(FOS_System.String asciiString)
{
byte[] result = new byte[asciiString.length];
for(int i = 0; i < asciiString.length; i++)
{
result[i] = (byte)asciiString[i];
}
return result;
}
示例7: Parse_DecimalSigned
/// <summary>
/// Parses a string as an signed decimal integer.
/// </summary>
/// <param name="str">The string to parse.</param>
/// <returns>The parsed int.</returns>
public static int Parse_DecimalSigned(FOS_System.String str)
{
bool neg = str.StartsWith("-");
int result = (int)Parse_DecimalUnsigned(str, (neg ? 1 : 0));
if (neg)
{
result *= -1;
}
return result;
}
示例8: Concat
public static unsafe FOS_System.String Concat(FOS_System.String str1, FOS_System.String str2)
{
FOS_System.String newStr = New(str1.length + str2.length);
for (int i = 0; i < str1.length; i++)
{
newStr[i] = str1[i];
}
for (int i = 0; i < str2.length; i++)
{
newStr[i + str1.length] = str2[i];
}
return newStr;
}
示例9: Process
public Process(ThreadStartMethod MainMethod, uint AnId, FOS_System.String AName, bool userMode)
{
#if PROCESS_TRACE
BasicConsole.WriteLine("Constructing process object...");
#endif
Id = AnId;
Name = AName;
UserMode = userMode;
#if PROCESS_TRACE
BasicConsole.WriteLine("Creating thread...");
#endif
CreateThread(MainMethod);
}
示例10: Parse_DecimalUnsigned
/// <summary>
/// Parses a string as an unsigned decimal integer.
/// </summary>
/// <param name="str">The string to parse.</param>
/// <param name="offset">The offset into the string at which to start parsing.</param>
/// <returns>The parsed uint.</returns>
public static uint Parse_DecimalUnsigned(FOS_System.String str, int offset)
{
uint result = 0;
for(int i = offset; i < str.length; i++)
{
char c = str[i];
if (c < '0' || c > '9')
{
break;
}
result *= 10;
result += (uint)(c - '0');
}
return result;
}
示例11: OutputExceptionInfo
protected void OutputExceptionInfo(FOS_System.Exception Ex)
{
if (Ex != null)
{
console.WarningColour();
console.WriteLine(Ex.Message);
if (Ex is FOS_System.Exceptions.PageFaultException)
{
console.WriteLine(((FOS_System.String)" - Address: ") + ((FOS_System.Exceptions.PageFaultException)Ex).address);
console.WriteLine(((FOS_System.String)" - Error code: ") + ((FOS_System.Exceptions.PageFaultException)Ex).errorCode);
}
console.DefaultColour();
}
else
{
console.WriteLine("No current exception.");
}
}
示例12: Push
public bool Push(FOS_System.Object obj)
{
AccessLock.Enter();
try
{
if (WriteIdx == ReadIdx &&
ReadIdx != -1)
{
if (ThrowExceptions)
{
ExceptionMethods.Throw(new Exceptions.OverflowException("Circular buffer cannot Push because the buffer is full."));
}
return false;
}
WriteIdx++;
if (WriteIdx == _array.Length)
{
if (ReadIdx == -1)
{
WriteIdx--;
if (ThrowExceptions)
{
ExceptionMethods.Throw(new Exceptions.OverflowException("Circular buffer cannot Push because the buffer is full."));
}
return false;
}
WriteIdx = 0;
}
_array[WriteIdx] = obj;
return true;
}
finally
{
AccessLock.Exit();
}
}
示例13: Push
public void Push(FOS_System.Object val)
{
if ((BackIdx != 0 && FrontIdx == BackIdx - 1) ||
(BackIdx == 0 && FrontIdx == InternalArray.Length - 1))
{
// Queue full
if (CanExpand)
{
Expand(InternalArray.Length);
}
else
{
return;
}
}
InternalArray[FrontIdx++] = val;
if (FrontIdx >= InternalArray.Length)
{
FrontIdx = 0;
}
}
示例14: BasicConsole_SecondaryOutput
private static void BasicConsole_SecondaryOutput(FOS_System.String str)
{
Hardware.IO.Serial.Serial.COM1.Write(str);
}
示例15: Add
public void Add(FOS_System.Object obj)
{
//If the next index to insert an item at is beyond the capacity of
// the array, we need to expand the array.
if (nextIndex >= _array.Length)
{
ExpandCapacity(ExpandAmount);
}
//Insert the object at the next index in the internal array then increment
// next index
_array[nextIndex] = obj;
nextIndex++;
}