### BeefLang Instance Initializer Example Source: https://www.beeflang.org/docs/doxygen/corlib/html/namespace_system Shows an instance initializer block in BeefLang, typically used for setting up the state of an object when it's created. This specific example seems related to managing resources or state. ```beeflang | **[instance initializer]** ``` -------------------------------- ### GetStartupInfoA Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_windows Retrieves the startup information for the current process. This function is used to get details about how the process was started. ```APIDOC ## GetStartupInfoA ### Description Retrieves the startup information for the current process. ### Method N/A (Static function) ### Endpoint N/A (Static function) ### Parameters - **startupInfo** (StartupInfo*) - Required - A pointer to a StartupInfo structure to receive the information. ### Response #### Success Response (N/A) N/A ``` -------------------------------- ### C# 'Hello World' Example Source: https://www.beeflang.org/docs/getting-start A basic 'Hello World' program written in C# to demonstrate console output. This code is intended to be compiled and run within the Beef IDE or using BeefBuild. ```csharp using System; namespace Hello { class Program { static void Main() { Console.WriteLine("Hello, world!"); } } } ``` -------------------------------- ### Process Management Functions Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_diagnostics_1_1_spawned_process Functions for managing processes, including starting, attaching streams, waiting, and terminating. ```APIDOC ## Public Member Functions ### Start Starts a new process with the specified `ProcessStartInfo`. - **Method**: `Result< void >` - **Endpoint**: Not applicable (class method) - **Parameters**: - **startInfo** (`ProcessStartInfo`) - Required - Information about the process to start. ### AttachStandardInput Attaches a file stream to the standard input of the process. - **Method**: `Result< void >` - **Endpoint**: Not applicable (class method) - **Parameters**: - **stream** (`IFileStream`) - Required - The file stream to attach to standard input. ### AttachStandardOutput Attaches a file stream to the standard output of the process. - **Method**: `Result< void >` - **Endpoint**: Not applicable (class method) - **Parameters**: - **stream** (`IFileStream`) - Required - The file stream to attach to standard output. ### AttachStandardError Attaches a file stream to the standard error of the process. - **Method**: `Result< void >` - **Endpoint**: Not applicable (class method) - **Parameters**: - **stream** (`IFileStream`) - Required - The file stream to attach to standard error. ### WaitFor Waits for the process to exit, optionally with a timeout. - **Method**: `bool` - **Endpoint**: Not applicable (class method) - **Parameters**: - **waitMS** (`int`) - Optional - The time in milliseconds to wait for the process to exit. Defaults to -1 (wait indefinitely). ### Close Closes the process handle. - **Method**: `void` - **Endpoint**: Not applicable (class method) ### Kill Terminates the process with the specified exit code and kill flags. - **Method**: `void` - **Endpoint**: Not applicable (class method) - **Parameters**: - **exitCode** (`int32`) - Optional - The exit code to return when the process terminates. Defaults to 0. - **killFlags** (`KillFlags`) - Optional - Flags to control process termination behavior. Defaults to `KillFlags.None`. ``` -------------------------------- ### System.IndexRange Properties Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_index_range Describes the properties of the System.IndexRange class, including Start, End, and IsClosed, which provide access to the range's boundaries and closure state with get and set accessors. ```beef Index Start { get; set; } Index End { get; set; } bool IsClosed { get; set; } ``` -------------------------------- ### Get Standard Name - System.TimeZoneInfo Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_time_zone_info-members Retrieves the standard name of the time zone, which is the name used when daylight saving time is not in effect. For example, "Pacific Standard Time". ```csharp public string StandardName ``` -------------------------------- ### Beef Corlib: ProcessStartInfo Properties Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_diagnostics_1_1_process_start_info Outlines the configurable properties for the ProcessStartInfo class in Beef Corlib. These properties allow fine-grained control over standard input/output redirection, window creation, and activation. ```Beef bool | UseShellExecute [get, set] bool | RedirectStandardInput [get, set] bool | RedirectStandardOutput [get, set] bool | RedirectStandardError [get, set] bool | CreateNoWindow [get, set] bool | ActivateWindow [get, set] ``` -------------------------------- ### File Finding: Iterating Through Directory Contents Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_platform-members Functions for finding and iterating through files in a directory. BfpFindFileData_FindFirstFile starts the search, and BfpFindFileData_FindNextFile retrieves subsequent entries. Functions are available to get file attributes, name, size, and timestamps. ```Beef BfpFindFileData_FindFirstFile(char8 *path, BfpFindFileFlags flags, BfpFileResult *outResult); BfpFindFileData_FindNextFile(BfpFindFileData *findData); BfpFindFileData_GetFileAttributes(BfpFindFileData *findData); BfpFindFileData_GetFileName(BfpFindFileData *findData, char8 *outName, int32 *inOutNameSize, BfpFileResult *outResult); BfpFindFileData_GetFileSize(BfpFindFileData *findData); BfpFindFileData_GetTime_Access(BfpFindFileData *findData); BfpFindFileData_GetTime_Created(BfpFindFileData *findData); BfpFindFileData_GetTime_LastWrite(BfpFindFileData *findData); BfpFindFileData_Release(BfpFindFileData *findData); ``` -------------------------------- ### System.Windows.COM_IUnknown.VTable Methods Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_windows_1_1_c_o_m___i_file_open_dialog_1_1_v_table-members Documentation for the core COM IUnknown VTable methods. ```APIDOC ## COM_IUnknown.VTable Methods ### Description Standard COM IUnknown interface methods for reference counting and interface querying. ### Methods - **QueryInterface** - **Description**: Queries for a pointer to the requested interface on the current object. - **Signature**: `HResult(COM_IUnknown *self, ref Guid riid, void **result)` - **AddRef** - **Description**: Increments the reference count for the object. - **Signature**: `uint32(COM_IUnknown *self)` - **Release** - **Description**: Decrements the reference count for the object and destroys the object when the count reaches zero. - **Signature**: `uint32(COM_IUnknown *self)` ``` -------------------------------- ### BeefLang Static Initializer Example Source: https://www.beeflang.org/docs/doxygen/corlib/html/namespace_system Illustrates a static initializer pattern in BeefLang, likely used for setting up static members or performing one-time initialization. It shows calling a 'GetHashCode' method on a value. ```beeflang | **[static initializer]** return mValue. | **GetHashCode** () ``` -------------------------------- ### Beef Corlib Properties Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_globalization_1_1_time_span_format_1_1_format_literals This section describes the properties of the Beef Corlib, which provide controlled access to the internal state of an object, typically through getter methods. Examples include `Start`, `DayHourSep`, `HourMinuteSep`, `MinuteSecondSep`, `SecondFractionSep`, and `End`, likely related to formatting or time representation. ```Beef String Start { get; } String DayHourSep { get; } String HourMinuteSep { get; } String MinuteSecondSep { get; } String SecondFractionSep { get; } String End { get; } ``` -------------------------------- ### System.Windows.COM_IFileOpenDialog.VTable Methods Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_windows_1_1_c_o_m___i_file_open_dialog_1_1_v_table-members Documentation for the methods available in the VTable of System.Windows.COM_IFileOpenDialog. ```APIDOC ## COM_IFileOpenDialog.VTable Methods ### Description This section details the methods exposed by the COM_IFileOpenDialog VTable, including their parameters and return types. ### Methods - **GetResults** - **Description**: Retrieves the results of the file open dialog. - **Signature**: `HResult(COM_IFileOpenDialog *self, out COM_IShellItemArray *ppenum)` - **GetSelectedItems** - **Description**: Retrieves the selected items from the file open dialog. - **Signature**: `HResult(COM_IFileOpenDialog *self, out COM_IShellItemArray *ppsai)` - **Show** - **Description**: Displays the file dialog to the user. - **Signature**: `HResult(COM_IFileDialog *self, Windows.HWnd parent)` - **SetFileTypes** - **Description**: Sets the file types filter for the dialog. - **Signature**: `HResult(COM_IFileDialog *self, uint cFileTypes, COMDLG_FILTERSPEC *rgFilterSpec)` - **SetFileTypeIndex** - **Description**: Sets the index of the currently selected file type. - **Signature**: `HResult(COM_IFileDialog *self, uint iFileType)` - **GetFileTypeIndex** - **Description**: Retrieves the index of the currently selected file type. - **Signature**: `HResult(COM_IFileDialog *self, out uint piFileType)` - **Advise** - **Description**: Advises the dialog of events. - **Signature**: `HResult(COM_IFileDialog *self, COM_IFileDialogEvents *pfde, out uint pdwCookie)` - **SetOptions** - **Description**: Sets options for the file dialog. - **Signature**: `HResult(COM_IFileDialog *self, FOS fos)` - **GetOptions** - **Description**: Retrieves the current options of the file dialog. - **Signature**: `HResult(COM_IFileDialog *self, out FOS pfos)` - **SetDefaultFolder** - **Description**: Sets the default folder for the dialog. - **Signature**: `HResult(COM_IFileDialog *self, COM_IShellItem *psi)` - **GetFolder** - **Description**: Retrieves the current folder of the dialog. - **Signature**: `HResult(COM_IFileDialog *self, out COM_IShellItem *ppsi)` - **SetFileName** - **Description**: Sets the default file name for the dialog. - **Signature**: `HResult(COM_IFileDialog *self, char16 *pszName)` - **GetFileName** - **Description**: Retrieves the current file name from the dialog. - **Signature**: `HResult(COM_IFileDialog *self, out char16 *pszName)` - **AddPlace** - **Description**: Adds a known folder to the dialog. - **Signature**: `HResult(COM_IFileDialog *self, COM_IShellItem *psi, FDAP fdap)` - **Close** - **Description**: Closes the file dialog. - **Signature**: `HResult(COM_IFileDialog *self, int hr)` - **SetClientGuid** - **Description**: Sets the GUID of the client that is creating the dialog. - **Signature**: `HResult(COM_IFileDialog *self, ref Guid guid)` - **ClearClientData** - **Description**: Clears any client-defined data from the dialog. - **Signature**: `HResult(COM_IFileDialog *self)` - **SetFilter** - **Description**: Sets a custom filter for the dialog. - **Signature**: `HResult(COM_IFileDialog *self, void *pFilter)` ``` -------------------------------- ### COM_IFileOpenDialog Static Attributes and GUIDs Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_windows_1_1_c_o_m___i_file_open_dialog Defines the static GUID constants for COM_IFileOpenDialog and its base class COM_IFileDialog. These GUIDs are essential for COM object instantiation and identification. ```beef static new Guid | **sIID** = .(0xD57C7288, 0xD4AD, 0x4768, 0xBE, 0x02, 0x9D, 0x96, 0x95, 0x32, 0xD9, 0x60) static Guid | **sIID** = .(0x42f85136, 0xdb7e, 0x439c, 0x85, 0xf1, 0xe4, 0x07, 0x5d, 0x13, 0x5f, 0xc8) static Guid | **sCLSID** = .(0xdc1c5a9c, 0xe88a, 0x4dde, 0xa5, 0xa1, 0x60, 0xf8, 0x2a, 0x20, 0xae, 0xf7) ``` -------------------------------- ### COM_IFileDialog VTable Member Functions (Beef) Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_windows_1_1_c_o_m___i_file_dialog_1_1_v_table-members This snippet details the member functions of the COM_IFileDialog.VTable in the Beef programming language. It covers functions for showing the dialog, setting and getting file types, managing event handlers, configuring dialog options, setting and retrieving folders, file names, titles, labels, and results. It also includes functions for adding places, setting default extensions, closing the dialog, and managing client GUIDs and data. ```Beef HResult(COM_IFileDialog *self, Windows.HWnd parent) Show (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, uint cFileTypes, COMDLG_FILTERSPEC *rgFilterSpec) SetFileTypes (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, uint iFileType) SetFileTypeIndex (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, out uint piFileType) GetFileTypeIndex (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, COM_IFileDialogEvents *pfde, out uint pdwCookie) Advise (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, uint dwCookie) Unadvise (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, FOS fos) SetOptions (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, out FOS pfos) GetOptions (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, COM_IShellItem *psi) SetDefaultFolder (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, COM_IShellItem *psi) SetFolder (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, out COM_IShellItem *ppsi) GetFolder (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, out COM_IShellItem *ppsi) GetCurrentSelection (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, char16 *pszName) SetFileName (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, out char16 *pszName) GetFileName (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, char16 *pszTitle) SetTitle (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, char16 *pszText) SetOkButtonLabel (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, char16 *pszLabel) SetFileNameLabel (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, out COM_IShellItem *ppsi) GetResult (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, COM_IShellItem *psi, FDAP fdap) AddPlace (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, char16 *pszDefaultExtension) SetDefaultExtension (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, int hr) Close (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, ref Guid guid) SetClientGuid (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self) ClearClientData (defined in System.Windows.COM_IFileDialog.VTable) HResult(COM_IFileDialog *self, void *pFilter) SetFilter (defined in System.Windows.COM_IFileDialog.VTable) ``` -------------------------------- ### Running a Beef Project with BeefBuild Source: https://www.beeflang.org/docs/beefbuild This command demonstrates how to compile and run a Beef project using BeefBuild. It specifies the workspace and passes arguments to the compiled program. Ensure the Beef IDE is installed and configured to use BeefBuild. ```BeefBuild BeefBuild -workspace=samples\HelloWorld -run -args Argument1 Argument2 ``` -------------------------------- ### DefaultExt Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set the default file extension for the dialog. It can be a StringView or null and has both 'get' and 'set' accessors. ```beef StringView? | **DefaultExt**` [get, set]` ``` -------------------------------- ### Beef Corlib: Console Initialization Example Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_console Demonstrates the initial value assignment for a handle, likely obtained from a system function like GetStdHandle. This is often part of setting up console I/O streams. ```Beef { let handle = GetStdHandle(STD_OUTPUT_HANDLE) } ``` -------------------------------- ### System.Version Constructor Overloads Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_version Demonstrates the different constructors available for the System.Version class, allowing initialization with varying levels of detail (major, minor, build, revision). ```Beef Version(uint32 major, uint32 minor) Version(uint32 major, uint32 minor, uint32 build) Version(uint32 major, uint32 minor, uint32 build, uint32 revision) ``` -------------------------------- ### Multiselect Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set a boolean value indicating whether multiple files can be selected. It has both 'get' and 'set' accessors. ```beef bool | **Multiselect**` [get, set]` ``` -------------------------------- ### DereferenceLinks Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set a boolean value indicating whether symbolic links should be dereferenced. It has both 'get' and 'set' accessors. ```beef bool | **DereferenceLinks**` [get, set]` ``` -------------------------------- ### Beef Corlib: Dictionary Manipulation and ProcessInfo Functions Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_diagnostics_1_1_process_start_info Demonstrates key functions for managing environment variables and setting process start information within the Beef Corlib. Includes dictionary operations and methods for configuring process execution. ```Beef Dictionary< String, String > mEnvironmentVariables | ~ DeleteDictionaryAndKeysAndValues (_) void | GetFileName (String outFileName) void | SetFileNameAndArguments (StringView string) void | SetFileName (StringView fileName) void | SetWorkingDirectory (StringView fileName) void | SetArguments (StringView arguments) void | SetVerb (StringView verb) void | AddEnvironmentVariable (StringView key, StringView value) | ProcessStartInfo (Process process) ``` -------------------------------- ### System.IComptimeMethodApply Source: https://www.beeflang.org/docs/doxygen/corlib/html/interface_system_1_1_i_comptime_method_apply-members Documentation for the System.IComptimeMethodApply interface, including its members. ```APIDOC ## System.IComptimeMethodApply ### Description This is the complete list of members for System.IComptimeMethodApply, including all inherited members. ### Method `ApplyToMethod` ### Endpoint N/A (Interface Member) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### ValidateNames Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set a boolean value determining whether file and path names should be validated. It has both 'get' and 'set' accessors. ```beef bool | **ValidateNames**` [get, set]` ``` -------------------------------- ### System.IOnFieldInit OnFieldInit Method Source: https://www.beeflang.org/docs/doxygen/corlib/html/interface_system_1_1_i_on_field_init-members Documentation for the OnFieldInit method within the System.IOnFieldInit interface. This method is defined in System.IOnFieldInit and takes FieldInfo and a pointer to Self as parameters. ```Beef OnFieldInit(FieldInfo fieldInfo, Self *prev) ``` -------------------------------- ### Get Enum Member Enumerator Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_enum Static function to get an enumerator for the members of an enumeration type. It can be used with a specific Type object or with generic type parameters. ```beef static EnumEnumerator GetEnumerator(Type type) static EnumEnumerator GetEnumerator() ``` -------------------------------- ### FileFindEntry Constructor and Methods Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_i_o_1_1_file_find_entry-members This section details the constructor and various methods of the System.IO.FileFindEntry class. These methods allow retrieval of file access times, creation times, file attributes, file names, paths, sizes, and last write times. Note that some methods have specific output parameters. ```Beef FileFindEntry(String searchStr, Platform.BfpFindFileData *findFileData) (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetAccessedTime() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetAccessedTimeUtc() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetCreatedTime() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetCreatedTimeUtc() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetFileAttributes() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetFileName(String outFileName) (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetFilePath(String outPath) (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetFileSize() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetLastWriteTime() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline GetLastWriteTimeUtc() (defined in System.IO.FileFindEntry)| System.IO.FileFindEntry| inline ``` -------------------------------- ### CheckPathExists Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set a boolean value indicating whether the dialog should check if the selected path exists. It has both 'get' and 'set' accessors. ```beef bool | **CheckPathExists**` [get, set]` ``` -------------------------------- ### System.Diagnostics.ProcessStartInfo Methods Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_diagnostics_1_1_process_start_info-members This snippet lists various methods available in the System.Diagnostics.ProcessStartInfo class. These methods are used for setting process arguments, environment variables, and file names. Some methods are defined as inline. ```Beef AddEnvironmentVariable(StringView key, StringView value) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline GetFileName(String outFileName) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline SetArguments(StringView arguments) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline SetFileName(StringView fileName) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline SetFileNameAndArguments(StringView string) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline SetVerb(StringView verb) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline SetWorkingDirectory(StringView fileName) (defined in System.Diagnostics.ProcessStartInfo)| System.Diagnostics.ProcessStartInfo| inline ``` -------------------------------- ### CheckFileExists Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set a boolean value determining whether the dialog should check if the selected file exists. It has both 'get' and 'set' accessors. ```beef virtual bool | **CheckFileExists**` [get, set]` ``` -------------------------------- ### AddExtension Property in System.IO.FileDialog Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_dialog A property to get or set a boolean value indicating whether to add the default extension to file names. It has both 'get' and 'set' accessors. ```beef bool | **AddExtension**` [get, set]` ``` -------------------------------- ### Beef Documentation Comments for Methods and Types Source: https://www.beeflang.org/docs/ide/documentation Demonstrates the use of documentation comments in Beef, supporting both `///` and `/** */` styles for methods and types. It includes examples of multi-line comments, attributes, and the use of `@brief` and `@param` tags for controlling displayed information in IDE prompts. ```Beef static { /// Must be placed directly above the method, including attributes. /// Using multiple lines like this is also fine. Both will be recognized. [Optimize] public static void DoAThing() {} /// Documentation also works for types. struct SomeStruct { /** * Multiline comment with two ** at the start works in the same way. */ void PrivateMethod() {} } /** * If you have a really long explainer here, you may not actually want to show that in autcompletion prompts. * @brief Allows you to select only this line to be shown. * * @param a This is shown when writing a call to this function and placing parameter "a". * @param b For the second argument, the documentation for b (this!) will show up instead. */ public static void DoAnotherThing(int a, int b) {} } ``` -------------------------------- ### System.Guid Static Members Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_guid Showcases static members of the System.Guid class, including overloaded operators and utility functions. This covers equality comparison, parsing a string into a Guid, and creating a new Guid. ```beef static public bool operator==(Guid val1, Guid val2) static public Result Parse(StringView val) static public Guid Create() ``` -------------------------------- ### Beeflang: STARTUPINFO Flags Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_windows Flags for the `STARTUPINFO` structure, used to specify how a new process should be created. `STARTF_USESTDHANDLES` indicates that the `hStdInput`, `hStdOutput`, and `hStdError` members of `STARTUPINFO` are valid and should be used for the new process's standard handles. ```beeflang const int32 | **STARTF_USESTDHANDLES** = 0x00000100 ``` -------------------------------- ### Get Method for System.PropertyBag in Beef Corlib Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_property_bag-members Documents the 'Get' method for the System.PropertyBag class. This method retrieves values from the bag using a key, with overloads for specifying an output parameter or a default value. ```Beef Get(String key, out T value) Get(String key, T defaultVal=default) ``` -------------------------------- ### Beeflang File Creation and Opening Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_i_o_1_1_file_stream Provides methods to create or open files with specified access modes, sharing options, buffer sizes, and file options. It returns a Result indicating success or a FileOpenError. Overloads allow for different combinations of parameters. ```Beeflang Result< void, FileOpenError > | **Create** (StringView path, FileAccess access=.ReadWrite, FileShare share=.None, int bufferSize=4096, FileOptions options=.None, SecurityAttributes *secAttrs=null) Result< void, FileOpenError > | **Open** (StringView path, FileAccess access=.ReadWrite, FileShare share=.None, int bufferSize=4096, FileOptions options=.None, SecurityAttributes *secAttrs=null) Result< void, FileOpenError > | **OpenStd** (Platform.BfpFileStdKind stdKind) Result< void, FileOpenError > | **Open** (StringView path, FileMode mode, FileAccess access, FileShare share=.None, int bufferSize=4096, FileOptions options=.None, SecurityAttributes *secAttrs=null) ``` -------------------------------- ### Startup Information Retrieval Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_windows-members Retrieves startup information for a process. This can include details about the environment and the main window. ```System.Windows GetStartupInfoA(StartupInfo *startupInfo) (defined in System.Windows)| System.Windows| ``` -------------------------------- ### Beef TLS Functions: Create, Release, Set, and Get Value Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_platform Functions for managing Thread-Local Storage (TLS). This includes creating and releasing TLS objects, and setting or getting values associated with a thread. ```beef static BfpTLS * | **BfpTLS_Create** (function[CallingConvention(.Stdcall)] void(void *) exitProc) static void | **BfpTLS_Release** (BfpTLS *tls) static void | **BfpTLS_SetValue** (BfpTLS *tls, void *value) static void * | **BfpTLS_GetValue** (BfpTLS *tls) ``` -------------------------------- ### Initialize System - Beef Corlib Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_collections_1_1_split_list_1_1_data The static `Init` function in the Beef Corlib is used to initialize the system. It takes no arguments and returns void. This is a crucial step before utilizing other system functionalities. ```Beef static void Init() ``` -------------------------------- ### System.IOnTypeInit OnTypeInit Method Source: https://www.beeflang.org/docs/doxygen/corlib/html/interface_system_1_1_i_on_type_init-members This describes the OnTypeInit method within the System.IOnTypeInit interface. It takes a Type object and a pointer to the previous instance as input. This is a core method for type initialization processes. ```Beef OnTypeInit(Type type, Self *prev) ``` -------------------------------- ### Beef System Functions: GUID Creation and Computer Name Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_platform Provides static functions for generating a Globally Unique Identifier (GUID) and retrieving the computer name. The computer name retrieval populates an output buffer. ```beef static void | **BfpSystem_CreateGUID** (Guid *outGuid) static void | **BfpSystem_GetComputerName** (char8 *outStr, int32 *inOutStrSize, BfpSystemResult *outResult) ``` -------------------------------- ### BeefLang Static Method Example Source: https://www.beeflang.org/docs/doxygen/corlib/html/namespace_system Provides an example of a static method signature in BeefLang. The 'UtcOffsetOutOfRange' method takes a TimeSpan as input and returns a boolean, likely to check if a UTC offset is within acceptable bounds. ```beeflang static bool | **UtcOffsetOutOfRange** (TimeSpan offset) ``` -------------------------------- ### System.EnumParser.OnTypeInit() Method Documentation Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_enum_parser-members Documents the static inline method OnTypeInit() within the System.EnumParser class. This method is defined directly within the System.EnumParser class. ```Beef public static inline OnTypeInit() : void ``` -------------------------------- ### ProcessStartInfo - Properties Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_diagnostics_1_1_process_start_info Details on the settable properties of the ProcessStartInfo class. ```APIDOC ## Properties ### Description Provides information about the settable properties of the ProcessStartInfo class. ### Method N/A (These are properties, not standalone API endpoints) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ## Specific Properties (get, set): - **bool UseShellExecute** - Description: Gets or sets a value indicating whether to use the operating system shell to start the process. - **bool RedirectStandardInput** - Description: Gets or sets a value indicating whether the standard input stream of the application is redirected. - **bool RedirectStandardOutput** - Description: Gets or sets a value indicating whether the standard output stream of the application is redirected. - **bool RedirectStandardError** - Description: Gets or sets a value indicating whether the standard error stream of the application is redirected. - **bool CreateNoWindow** - Description: Gets or sets a value indicating whether to create a window for the process. - **bool ActivateWindow** - Description: Gets or sets a value indicating whether to activate the process window. ``` -------------------------------- ### CoCreateInstance Static Member Function in Beef Corlib Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_windows_1_1_c_o_m___i_shell_item Implements the CoCreateInstance static function, a member of COM_IUnknown. It takes a reference to a GUID, an outer COM_IUnknown pointer, ClsContext, a reference to a GUID, and a void pointer to the result as arguments. ```beef static HResult | **CoCreateInstance** (ref Guid clsId, COM_IUnknown *unkOuter, ClsContext clsCtx, ref Guid iid, void **result) ``` -------------------------------- ### Initiate Profiling via Target Program (Beef) Source: https://www.beeflang.org/docs/ide/profiling Demonstrates how to initiate the Beef IDE profiler from within the target program using the 'System.Diagnostics.Profiler' class. This allows for program-defined profiling intervals, useful for specific long calculations. No external dependencies are required beyond the core Beef libraries. ```beef using System.Diagnostics; public void StartProfilingSection() { Profiler.Instance.Start(); // ... perform long calculation ... Profiler.Instance.Stop(); } ``` -------------------------------- ### FFIType Get Static Method Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_f_f_i_1_1_f_f_i_type Defines the static `Get` method for the `FFIType` class. This method is used to retrieve or create an `FFIType` instance based on a given `Type`. It supports optional arguments for memory allocation and size output. ```beef static FFIType * | **Get** (Type type, void *allocBytes=null, int *inOutSize=null) ``` -------------------------------- ### Beef Macros for Project and Workspace Management Source: https://www.beeflang.org/docs/projects These macros provide dynamic information about the Beef installation path, Visual Studio tools, build configurations, platforms, and project-specific directories and file paths. They are essential for scripting build processes and configurations. ```Beef /* General Macros */ $(BeefPath) $(Slash str) $(Var varName) $(VSToolPath) $(VSToolPath_x64) $(VSToolPath_x86) /* Workspace Macros */ $(Configuration) $(Platform) $(WorkspaceDir) /* Project Macros */ $(Arguments) $(BuildDir) $(LinkFlags) $(ProjectDir) $(ProjectName) $(TargetDir) $(TargetPath) $(WorkingDir) /* Example with project name */ $(BuildDir LibA) ``` -------------------------------- ### Beeflang Append Allocation Example Source: https://www.beeflang.org/docs/language-guide/memory Demonstrates using `[AllowAppend]` to allocate memory alongside an object during construction. The second example shows how `ZeroGap=true` can be used to ensure immediate adjacency for pointer calculation, avoiding extra fields in derived classes. ```Beeflang class FloatArray { int mLength; float* mPtr; [AllowAppend] public this(int length) { let ptr = append float[length]*; mPtr = ptr; mLength = length; } } /* Append allocations are guaranteed to occur immediately after the object's own memory (with respect to alignment). We can use this knowledge to calculate the storage location of the array rather than storing it internally. Note the "ZeroGap" property being used here, which ensures that no classes can extend this type and add additional fields which would invalidate our append location assumption. */ class FloatArray { int mLength; [AllowAppend(ZeroGap=true)] public this(int length) { let ptr = append float[length]*; mLength = length; } public float* Ptr { get { return (float*)(&mLength + 1); } } } ``` -------------------------------- ### Calling Conventions and Memory Management Source: https://www.beeflang.org/docs/language-guide/interop Details the default 'cdecl' calling convention, how to use `[StdCall]`, and strategies for managing memory when using the CRT allocator for FFI. ```APIDOC ## Calling Conventions and CRT Allocator ### Description Beef uses the system 'cdecl' calling convention by default. Methods can be marked with `[StdCall]` to use the system 'stdcall' convention. For FFI memory management requiring the CRT allocator, Beef provides `System.Internal.StdMalloc` and `System.Internal.StdFree`, or the `System.gCRTAlloc` custom allocator if the global workspace allocator is not the CRT's. ### Method Attribute Application / Code Usage ### Endpoint N/A (Code Declaration / Usage) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```beef /* Using StdCall convention */ [StdCall] static extern void ProcessData(int32 data); /* Manual memory management for FFI */ let ptr = System.Internal.StdMalloc(1024); // ... use ptr ... System.Internal.StdFree(ptr); ``` ### Response #### Success Response (200) N/A (Code Example) #### Response Example N/A (Code Example) ``` -------------------------------- ### File Positioning Flags (WinAPI Constants) Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_windows-members These constants are used with file I/O operations to specify the starting position for reading or writing. FILE_BEGIN indicates the start of the file, FILE_CURRENT indicates the current position, and FILE_END indicates the end of the file. ```c #define FILE_BEGIN 0 #define FILE_CURRENT 1 #define FILE_END 2 ``` -------------------------------- ### Beeflang Boxing Examples Source: https://www.beeflang.org/docs/language-guide/memory Illustrates boxing of value types into `System.Object`. The examples show implicit boxing during format calls, explicit boxing to the current scope using `scope box::`, and explicit boxing through a custom allocator with `new:allok box`. ```Beeflang // Format calls rely on boxing to handle incoming types Console.WriteLine("a + b = {}", a + b); Object a = 1.2f; // Implicitly boxed on stack to current scope on Object b = scope box:: 2.3f; // Explicitly boxed on stack to method scope Object c = new:allok box 4.5f; // Explicitly boxed through a custom allocator 'allok' ``` -------------------------------- ### Beef Corlib: Get Function Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_index The Get function takes an integer size as input and returns an integer. This function likely retrieves or calculates a value based on the provided size, possibly related to memory allocation, data retrieval, or collection sizes within the Beef Corlib. ```Beef int | **Get** (int size) ``` -------------------------------- ### Implement UI Initialization and Code Generation in C++ Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_compiler_1_1_new_class_generator This snippet shows the implementation of 'InitUI' for UI initialization and 'Generate' for code generation within the System.Compiler.NewClassGenerator class. It overrides base class functions to provide specific behavior for UI setup and file output. Dependencies include String, Flags, and StringView types. ```cpp override void | **InitUI** () override void | **Generate** (String outFileName, String outText, ref Flags generateFlags) ``` -------------------------------- ### String Initialization and Construction in System.String Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_string_with_alloc-members Demonstrates how to initialize or create new string objects. This includes creating a string of a specified character repetition and setting a string's content. ```Beeflang string repeated = new String(5); // Creates a string of 5 null characters (\0\0\0\0\0) String targetString; System.String.Set("initial value", out targetString); // targetString is now "initial value" ``` -------------------------------- ### Beef Method Attributes Examples Source: https://www.beeflang.org/docs/language-guide/datatypes/attributes Provides examples of various Beef method attributes, including AlwaysInclude, Checked, Commutable, Comptime, DisableChecks, DisableObjectAccessChecks, Error, Export, Import, Inline, Intrinsic, NoDiscard, NoReturn, Obsolete, Optimized, SkipCall, StdCall, Test, Unchecked, and Warn. ```Beef [ AlwaysInclude ] func needs_reflection() {} [ Checked ] func validate_input(int value) { // Runtime checks } [ Commutable ] func add(int a, int b) -> int { return a + b; } [ Comptime ] func compile_time_calc(int x) -> int { return x * 2; } [ DisableChecks ] func fast_operation() { // Operations without runtime checks } [ DisableObjectAccessChecks ] func bypass_access_checks() { // Access members without checks } [ Error("This method is deprecated and should not be used.") ] func deprecated_method() {} [ Export ] func exported_function() {} [ Import("my_dll.dll") ] func imported_function() {} [ Inline ] func inline_me() {} [ Intrinsic ] func intrinsic_operation() {} [ NoDiscard ] func returns_value() -> int { return 42; } [ NoReturn ] func exit_program() -> int { exit(0); } [ Obsolete("Use new_method instead.") ] func old_method() {} [ Optimized ] func optimized_func() {} [ SkipCall ] func skip_this_call() {} [ StdCall ] func stdcall_func() {} [ Test ] func my_test() { // Test logic } [ Unchecked ] func perform_unchecked() { // Operations without runtime checks } [ Warn("This method may cause issues.") ] func questionable_method() {} ``` -------------------------------- ### Constructor and Checker Functions in System.Runtime Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_runtime-members This snippet includes constructor and utility functions for managing runtime states and checking conditions. It covers the initialization of the Runtime, specific error handling checks, and the creation of assert errors with detailed kind information. ```Beef ErrorHandlerResult(AssertError.Kind kind, String error, String filePath, int lineNum) CheckAssertError (defined in System.Runtime)| System.Runtime| static int32(char8 *kind, char8 *arg1, char8 *arg2, int arg3) CheckErrorHandler (defined in System.Runtime)| System.Runtime| static ``` -------------------------------- ### DaylightTime Properties - Beef Corlib Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_globalization_1_1_daylight_time-members This snippet outlines the properties of the DaylightTime class in Beef Corlib. It includes 'Delta', 'End', and 'Start' properties, which represent the time shift, the end of the daylight saving period, and the start of the daylight saving period, respectively. These properties are crucial for calculating and representing daylight saving time intervals. ```Beef namespace System.Globalization { public class DaylightTime { public TimeSpan Delta { get; } public DateTime End { get; } public DateTime Start { get; } } } ``` -------------------------------- ### ThreadPoolTaskScheduler.RequiresAtomicStartTransition Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_threading_1_1_tasks_1_1_thread_pool_task_scheduler Indicates if the scheduler requires atomic start transitions. ```APIDOC ## GET /websites/beeflang/ThreadPoolTaskScheduler/RequiresAtomicStartTransition ### Description This is the only scheduler that returns false for this property, indicating that the task entry codepath is unsafe (CAS free) since we know that the underlying scheduler already takes care of atomic transitions from queued to non-queued. ### Method GET ### Endpoint /websites/beeflang/ThreadPoolTaskScheduler/RequiresAtomicStartTransition ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "No request body needed for GET request" } ``` ### Response #### Success Response (200) - **requiresAtomic** (boolean) - False, indicating unsafe CAS-free codepath. #### Response Example ```json { "requiresAtomic": false } ``` ``` -------------------------------- ### StartupInfo Public Attributes Source: https://www.beeflang.org/docs/doxygen/corlib/html/struct_system_1_1_windows_1_1_startup_info Details the public attributes of the StartupInfo class, including their types and descriptions. ```APIDOC ## StartupInfo Public Attributes ### Description This section details the public attributes available within the `StartupInfo` class. ### Method N/A (Class Attributes) ### Endpoint N/A (Class Attributes) ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) - **mCb** (int32) - Size of StartupInfo structure. - **mReserved** (char8 *) - Reserved field. - **mDesktop** (char8 *) - Name of the desktop to be used. - **mTitle** (char8 *) - Title of the new window. - **mX** (int32) - Horizontal position of the new window. - **mY** (int32) - Vertical position of the new window. - **mXSize** (int32) - Width of the new window. - **mYSize** (int32) - Height of the new window. - **mXCountChars** (int32) - Width of the new window in characters. - **mYCountChars** (int32) - Height of the new window in characters. - **mFillAttribute** (int32) - Initial background and foreground colors for the new window. - **mFlags** (int32) - Flags that control the appearance or behavior of the new window. - **mShowWindow** (int16) - How the window is to be shown. - **mReserved2** (int16) - Reserved field. - **mReserved3** (uint8 *) - Reserved field. - **mStdInput** (FileHandle) - Handle to the standard input device for the new process. - **mStdOutput** (FileHandle) - Handle to the standard output device for the new process. - **mStdError** (FileHandle) - Handle to the standard error device for the new process. #### Response Example N/A ``` -------------------------------- ### System.Platform File I/O Operations Source: https://www.beeflang.org/docs/doxygen/corlib/html/class_system_1_1_platform-members This comprehensive set of functions provides various file manipulation capabilities. It includes copying, creating, deleting, checking existence, flushing, getting the actual and full path of files, retrieving file attributes and size, accessing standard file handles (stdin, stdout, stderr), and getting the system handle of a file. ```beef BfpFile_Copy(char8 *oldPath, char8 *newPath, BfpFileCopyKind copyKind, BfpFileResult *outResult) BfpFile_Create(char8 *name, BfpFileCreateKind createKind, BfpFileCreateFlags createFlags, BfpFileAttributes createdFileAttrs, BfpFileResult *outResult) BfpFile_Delete(char8 *path, BfpFileResult *outResult) BfpFile_Exists(char8 *path) BfpFile_Flush(BfpFile *file) BfpFile_GetActualPath(char8 *inPath, char8 *outPath, int32 *inOutPathSize, BfpFileResult *outResult) BfpFile_GetAttributes(char8 *path, BfpFileResult *outResult) BfpFile_GetFileSize(BfpFile *file) BfpFile_GetFullPath(char8 *inPath, char8 *outPath, int32 *inOutPathSize, BfpFileResult *outResult) BfpFile_GetStd(BfpFileStdKind kind, BfpFileResult *outResult) BfpFile_GetSystemHandle(BfpFile *file) ```