Here are the examples of the csharp api ulong.ToString() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
529 Examples
19
View Source File : MapSchemaStringBuilder.cs
License : MIT License
Project Creator : 1996v
License : MIT License
Project Creator : 1996v
public void AppendUInt64Val(long position, ulong value)
{
sb.Append("KeyU64(" + value.ToString() + ")");
sb.Append(" ");
}
19
View Source File : MessengerBot.cs
License : MIT License
Project Creator : 4egod
License : MIT License
Project Creator : 4egod
public async Task<MessageResult> SendMessageAsync(ulong userId, string text, List<QuickReply> quickReplies)
{
return await SendMessageAsync(userId.ToString(), text, quickReplies);
}
19
View Source File : MessengerBot.cs
License : MIT License
Project Creator : 4egod
License : MIT License
Project Creator : 4egod
public async Task<MessageResult> RequestUserLocationAsync(ulong userId, string message)
{
return await RequestUserLocationAsync(userId.ToString(), message);
}
19
View Source File : MessengerBot.cs
License : MIT License
Project Creator : 4egod
License : MIT License
Project Creator : 4egod
public async Task<MessageResult> RequestUserPhoneNumberAsync(ulong userId, string message)
{
return await RequestUserPhoneNumberAsync(userId.ToString(), message);
}
19
View Source File : MessengerBot.cs
License : MIT License
Project Creator : 4egod
License : MIT License
Project Creator : 4egod
public async Task<MessageResult> RequestUserEmailAsync(ulong userId, string message)
{
return await RequestUserEmailAsync(userId.ToString(), message);
}
19
View Source File : MessengerBot.cs
License : MIT License
Project Creator : 4egod
License : MIT License
Project Creator : 4egod
public async Task<MessageResult> SendAttachment<T>(ulong userId, Attachment<T> attachment) where T : IAttachment
{
return await SendAttachment<T>(userId.ToString(), attachment);
}
19
View Source File : SocialPlatformManager.cs
License : MIT License
Project Creator : absurd-joy
License : MIT License
Project Creator : absurd-joy
void GetLoggedInUserCallback(Message<User> msg)
{
if (msg.IsError)
{
TerminateWithError(msg);
return;
}
myID = msg.Data.ID;
myOculusID = msg.Data.OculusID;
localAvatar = Instantiate(localAvatarPrefab);
localAvatar.CanOwnMicrophone = false;
localTrackingSpace = this.transform.Find("OVRCameraRig/TrackingSpace").gameObject;
localAvatar.transform.SetParent(localTrackingSpace.transform, false);
localAvatar.transform.localPosition = new Vector3(0, 0, 0);
localAvatar.transform.localRotation = Quaternion.idenreplacedy;
if (UnityEngine.Application.platform == RuntimePlatform.Android)
{
helpPanel.transform.SetParent(localAvatar.transform.Find("body"), false);
helpPanel.transform.localPosition = new Vector3(0, 1.0f, 1.0f);
helpMesh.material = gearMaterial;
}
else
{
helpPanel.transform.SetParent(localAvatar.transform.Find("hand_left"), false);
helpPanel.transform.localPosition = new Vector3(0, 0.2f, 0.2f);
helpMesh.material = riftMaterial;
}
localAvatar.oculusUserID = myID.ToString();
localAvatar.RecordPackets = true;
localAvatar.PacketRecorded += OnLocalAvatarPacketRecorded;
localAvatar.EnableMouthVertexAnimation = true;
Quaternion rotation = Quaternion.idenreplacedy;
switch (UnityEngine.Random.Range(0, 4))
{
case 0:
rotation.eulerAngles = START_ROTATION_ONE;
this.transform.localPosition = START_POSITION_ONE;
this.transform.localRotation = rotation;
break;
case 1:
rotation.eulerAngles = START_ROTATION_TWO;
this.transform.localPosition = START_POSITION_TWO;
this.transform.localRotation = rotation;
break;
case 2:
rotation.eulerAngles = START_ROTATION_THREE;
this.transform.localPosition = START_POSITION_THREE;
this.transform.localRotation = rotation;
break;
case 3:
default:
rotation.eulerAngles = START_ROTATION_FOUR;
this.transform.localPosition = START_POSITION_FOUR;
this.transform.localRotation = rotation;
break;
}
TransitionToState(State.CHECKING_LAUNCH_STATE);
// If the user launched the app by accepting the notification, then we want to
// join that room. If not, try to find a friend's room to join
if (!roomManager.CheckForInvite())
{
SocialPlatformManager.LogOutput("No invite on launch, looking for a friend to join.");
Users.GetLoggedInUserFriendsAndRooms()
.OnComplete(GetLoggedInUserFriendsAndRoomsCallback);
}
Voip.SetMicrophoneFilterCallback(MicFilter);
}
19
View Source File : SocialPlatformManager.cs
License : MIT License
Project Creator : absurd-joy
License : MIT License
Project Creator : absurd-joy
public static void AddRemoteUser(ulong userID)
{
RemotePlayer remoteUser = new RemotePlayer();
remoteUser.RemoteAvatar = Instantiate(s_instance.remoteAvatarPrefab);
remoteUser.RemoteAvatar.oculusUserID = userID.ToString();
remoteUser.RemoteAvatar.ShowThirdPerson = true;
remoteUser.RemoteAvatar.EnableMouthVertexAnimation = true;
remoteUser.p2pConnectionState = PeerConnectionState.Unknown;
remoteUser.voipConnectionState = PeerConnectionState.Unknown;
remoteUser.stillInRoom = true;
remoteUser.remoteUserID = userID;
s_instance.AddUser(userID, ref remoteUser);
s_instance.p2pManager.ConnectTo(userID);
s_instance.voipManager.ConnectTo(userID);
s_instance.LogOutputLine("Adding User " + userID);
}
19
View Source File : OvrAvatarSDKManager.cs
License : MIT License
Project Creator : absurd-joy
License : MIT License
Project Creator : absurd-joy
public void RequestAvatarSpecification(AvatarSpecRequestParams avatarSpecRequest)
{
avatarSpecificationQueue.Enqueue(avatarSpecRequest);
AvatarLogger.Log("Avatar spec request queued: " + avatarSpecRequest._userId.ToString());
}
19
View Source File : RedisLiteHelper.cs
License : MIT License
Project Creator : AElfProject
License : MIT License
Project Creator : AElfProject
public static byte[] ToUtf8Bytes(this ulong ulongVal)
{
return FastToUtf8Bytes(ulongVal.ToString());
}
19
View Source File : StorageKeyExtensions.cs
License : MIT License
Project Creator : AElfProject
License : MIT License
Project Creator : AElfProject
public static string ToStorageKey(this ulong n)
{
return n.ToString();
}
19
View Source File : Form_SteamID64_Editor.cs
License : MIT License
Project Creator : Aemony
License : MIT License
Project Creator : Aemony
private void ReadSteamID()
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDoreplacedents) + "\\My Games\\NieR_Automata";
dlg.Filter = "Data files (*.dat)|*.dat";
if (dlg.ShowDialog() == DialogResult.OK)
{
filePath = dlg.FileName;
if (filePath.Contains("SlotData"))
{
// SlotData files stores the SteamID64 in offset 04-11, GameData and SystemData files stores the SteamID64 in offset 00-07
fileOffset = 4;
}
else
{
fileOffset = 0;
}
try {
using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
stream.Position = fileOffset;
stream.Read(byteSteamID64, 0, 8);
}
// Convert to proper IDs.
// SteamID64 is stored as Little-Endian in the files, but as Intel is little-endian as well no reversal is needed
steamID3 = BitConverter.ToUInt32(byteSteamID64, 0);
textBoxSteamID3.Text = steamID3.ToString();
steamID64 = BitConverter.ToUInt64(byteSteamID64, 0);
textBoxSteamID64.Text = steamID64.ToString();
#if DEBUG
Console.WriteLine("Read: " + BitConverter.ToString(byteSteamID64));
Console.WriteLine("SteamID3: " + steamID3.ToString());
Console.WriteLine("SteamID64: " + steamID64.ToString());
#endif
// Misc
textBoxWorkingFile.Text = filePath;
textBoxWorkingFile.SelectionStart = textBoxWorkingFile.TextLength;
toolStripStatusLabel1.Text = "Read from " + Path.GetFileName(filePath) + ": " + BitConverter.ToString(byteSteamID64);
lastStatus = toolStripStatusLabel1.Text;
// Check if a new ID is already written, and if so, enable the button
if (String.IsNullOrWhiteSpace(textBoxSteamID64_New.Text) == false && String.IsNullOrWhiteSpace(filePath) == false && textBoxSteamID64_New.Text != textBoxSteamID64.Text)
{
buttonUpdate.Enabled = true;
}
else
{
buttonUpdate.Enabled = false;
}
} catch (Exception ex)
{
throw ex;
}
}
}
19
View Source File : Form_SteamID64_Editor.cs
License : MIT License
Project Creator : Aemony
License : MIT License
Project Creator : Aemony
private void WriteSteamID()
{
steamID64 = Convert.ToUInt64(textBoxSteamID64_New.Text);
byteSteamID64 = BitConverter.GetBytes(steamID64);
steamID3 = BitConverter.ToUInt32(byteSteamID64, 0); // Relies on byteSteamID64 having been updated.
#if DEBUG
Console.WriteLine("New bytes: " + BitConverter.ToString(byteSteamID64));
Console.WriteLine("New SteamID3: " + steamID3.ToString());
Console.WriteLine("New SteamID64: " + steamID64.ToString());
#endif
// SteamID64 is stored as Little-Endian in the files, but as Intel is little-endian as well no reversal is needed
try
{
// Create a backup first
File.Copy(filePath, filePath + DateTime.Now.ToString("_yyyy-MM-dd_HH-mm-ss.bak"));
// Now overwrite the data
using (Stream stream = File.Open(filePath, FileMode.Open, FileAccess.Write))
{
stream.Position = fileOffset;
stream.Write(byteSteamID64, 0, 8);
}
textBoxSteamID3.Text = steamID3.ToString();
textBoxSteamID64.Text = steamID64.ToString();
toolStripStatusLabel1.Text = "Wrote to " + Path.GetFileName(filePath) + ": " + BitConverter.ToString(byteSteamID64);
lastStatus = toolStripStatusLabel1.Text;
buttonUpdate.Enabled = false;
}
catch (Exception ex)
{
throw ex;
}
}
19
View Source File : ConversionTablePlugin.cs
License : GNU General Public License v2.0
Project Creator : afrantzis
License : GNU General Public License v2.0
Project Creator : afrantzis
void Update64bit(DataView dv)
{
long offset = dv.CursorOffset;
// make sure offset is valid
if (offset < dv.Buffer.Size - 7 && offset >= 0) {
long val = 0;
// create buffer for raw bytes
byte[] ba = new byte[8];
// fill byte[] according to endianess
if (littleEndian)
for (int i = 0; i < 8; i++)
ba[i] = dv.Buffer[offset+i];
else
for (int i = 0; i < 8; i++)
ba[7-i] = dv.Buffer[offset+i];
// set signed
val = BitConverter.ToInt64(ba);
Signed64bitEntry.Text = val.ToString();
// set unsigned
ulong uval = (ulong)val;
if (unsignedAsHex)
Unsigned64bitEntry.Text = string.Format("0x{0:x}", uval);
else
Unsigned64bitEntry.Text = uval.ToString();
}
else {
Clear64bit();
}
}
19
View Source File : RowData.cs
License : GNU Affero General Public License v3.0
Project Creator : aianlinb
License : GNU Affero General Public License v3.0
Project Creator : aianlinb
public override string ToString() {
return $"<{Key?.ToString() ?? "null"}>";
}
19
View Source File : ForeignRowData.cs
License : GNU Affero General Public License v3.0
Project Creator : aianlinb
License : GNU Affero General Public License v3.0
Project Creator : aianlinb
public override string ToString() {
return $"<{Key1?.ToString() ?? "null"}, { Key2?.ToString() ?? "null"}>";
}
19
View Source File : DiscordWebhook.cs
License : MIT License
Project Creator : Aiko-IT-Systems
License : MIT License
Project Creator : Aiko-IT-Systems
public async Task<DiscordMessage> EditMessageAsync(ulong messageId, DiscordWebhookBuilder builder, string thread_id = null)
{
builder.Validate(true);
return await (this.Discord?.ApiClient ?? this.ApiClient).EditWebhookMessageAsync(this.Id, this.Token, messageId.ToString(), builder, thread_id).ConfigureAwait(false);
}
19
View Source File : DiscordWebhookBuilder.cs
License : MIT License
Project Creator : Aiko-IT-Systems
License : MIT License
Project Creator : Aiko-IT-Systems
public async Task<DiscordMessage> SendAsync(DiscordWebhook webhook, ulong threadId) => await webhook.ExecuteAsync(this, threadId.ToString()).ConfigureAwait(false);
19
View Source File : DiscordWebhookBuilder.cs
License : MIT License
Project Creator : Aiko-IT-Systems
License : MIT License
Project Creator : Aiko-IT-Systems
public async Task<DiscordMessage> ModifyAsync(DiscordWebhook webhook, ulong messageId, ulong threadId) => await webhook.EditMessageAsync(messageId, this, threadId.ToString()).ConfigureAwait(false);
19
View Source File : actionChecker.cs
License : MIT License
Project Creator : AlbertMN
License : MIT License
Project Creator : AlbertMN
[STAThread]
public void ProcessFile(string file, bool tryingAgain = false) {
//Custom 'file read delay'
float fileReadDelay = Properties.Settings.Default.FileReadDelay;
if (fileReadDelay > 0) {
MainProgram.DoDebug("User has set file delay to " + fileReadDelay.ToString() + "s, waiting before processing...");
Thread.Sleep((int)fileReadDelay * 1000);
}
if (!File.Exists(file)) {
MainProgram.DoDebug("File doesn't exist (anymore).");
return;
}
//Make sure the file isn't in use before trying to access it
int tries = 0;
while (FileInUse(file) || tries >= 20) {
tries++;
}
if (tries >= 20 && FileInUse(file)) {
MainProgram.DoDebug("File in use in use and can't be read. Try again.");
return;
}
//Check unique file ID (dublicate check)
ulong theFileUid = 0;
bool gotFileUid = false;
tries = 0;
while (!gotFileUid || tries >= 30) {
try {
theFileUid = getFileUID(file);
gotFileUid = true;
} catch {
Thread.Sleep(50);
}
}
if (tries >= 30 && !gotFileUid) {
MainProgram.DoDebug("File in use in use and can't be read. Try again.");
return;
}
//Validate UID
if (lastFileUid == 0) {
lastFileUid = Properties.Settings.Default.LastActionFileUid;
}
if (lastFileUid == theFileUid && !tryingAgain) {
//Often times this function is called three times per file - check if it has already been (or is being) processed
return;
}
if (executedFiles.Contains(theFileUid) && !tryingAgain) {
MainProgram.DoDebug("Tried to execute an already-executed file (UID " + theFileUid.ToString() + ")");
return;
}
lastFileUid = theFileUid;
executedFiles.Add(theFileUid);
Properties.Settings.Default.LastActionFileUid = lastFileUid;
Properties.Settings.Default.Save();
MainProgram.DoDebug("Processing file...");
string originalFileName = file, fullContent = "";
if (!File.Exists(file)) {
MainProgram.DoDebug("File no longer exists when trying to read file.");
return;
}
//READ FILE
if (new FileInfo(file).Length != 0) {
try {
string fileContent;
fileContent = File.ReadAllText(file);
fullContent = Regex.Replace(fileContent, @"\t|\r", "");
} catch (Exception e) {
if (unsuccessfulReads < 20) {
MainProgram.DoDebug("Failed to read file - trying again in 200ms... (trying max 20 times)");
unsuccessfulReads++;
Thread.Sleep(200);
ProcessFile(file, true);
return;
} else {
MainProgram.DoDebug("Could not read file on final try; " + e);
unsuccessfulReads = 0;
return;
}
}
MainProgram.DoDebug(" - Read complete, content: " + fullContent);
} else {
MainProgram.DoDebug(" - File is empty");
ErrorMessageBox("No action was set in the action file.");
}
//END READ
//DateTime lastModified = File.GetCreationTime(file);
DateTime lastModified = File.GetLastWriteTime(file);
if (lastModified.AddSeconds(Properties.Settings.Default.FileEditedMargin) < DateTime.Now) {
//if (File.GetLastWriteTime(file).AddSeconds(Properties.Settings.Default.FileEditedMargin) < DateTime.Now) {
//Extra security - sometimes the "creation" time is a bit behind, but the "modify" timestamp is usually right.
MainProgram.DoDebug("File creation time: " + lastModified.ToString());
MainProgram.DoDebug("Local time: " + DateTime.Now.ToString());
if (GettingStarted.isConfiguringActions) {
//Possibly configure an offset - if this always happens
Console.WriteLine("File is actually too old, but configuring the software to maybe set an offset");
isConfiguringOffset = true;
if (lastModifiedOffsets == null) {
lastModifiedOffsets = new List<double>();
}
lastModifiedOffsets.Add((DateTime.Now - lastModified).TotalSeconds);
if (lastModifiedOffsets.Count >= 3) {
int average = (int)(lastModifiedOffsets.Average());
Console.WriteLine("File Margin fixed offset set to; " + average.ToString());
Properties.Settings.Default.AutoFileMarginFixer = average;
Properties.Settings.Default.Save();
}
} else {
bool isGood = false;
if (Properties.Settings.Default.AutoFileMarginFixer != 0) {
//if (lastModified.AddSeconds(-Properties.Settings.Default.AutoFileMarginFixer) < DateTime.Now) {
var d1 = lastModified.AddSeconds(-Properties.Settings.Default.FileEditedMargin);
var d2 = DateTime.Now.AddSeconds(-Properties.Settings.Default.AutoFileMarginFixer);
if (d1 < d2) {
isGood = true;
MainProgram.DoDebug("File timestamp is actually more than " + Properties.Settings.Default.FileEditedMargin.ToString() + "s old, but the software is configured to have an auto-file-margin fix for " + Properties.Settings.Default.AutoFileMarginFixer.ToString() + "s");
} else {
//MainProgram.DoDebug(d1.ToString());
//MainProgram.DoDebug(d2.ToString());
MainProgram.DoDebug("The " + Properties.Settings.Default.AutoFileMarginFixer.ToString() + "s didn't fix it");
}
}
if (!isGood) {
MainProgram.DoDebug("The file is more than " + Properties.Settings.Default.FileEditedMargin.ToString() + "s old, meaning it won't be executed.");
new CleanupService().Start();
return;
}
}
//}
}
MainProgram.DoDebug("\n[ -- DOING ACTION(S) -- ]");
MainProgram.DoDebug(" - " + file + " UID; " + theFileUid);
MainProgram.DoDebug(" - File exists, checking the content...");
//Process the file
using (StringReader reader = new StringReader(fullContent)) {
string theLine = string.Empty;
do {
theLine = reader.ReadLine();
if (theLine != null) {
MainProgram.DoDebug("\n[EXECUTING ACTION]");
CheckAction(theLine, file);
}
} while (theLine != null);
}
MainProgram.DoDebug("[ -- DONE -- ]");
}
19
View Source File : WindowUtils.cs
License : MIT License
Project Creator : AlexanderPro
License : MIT License
Project Creator : AlexanderPro
public static WindowInformation GetWindowInformation(IntPtr hWnd)
{
var text = GetWindowText(hWnd);
var wmText = GetWmGettext(hWnd);
var clreplacedName = GetClreplacedName(hWnd);
var realWindowClreplaced = RealGetWindowClreplaced(hWnd);
var hWndParent = NativeMethods.GetParent(hWnd);
var size = GetWindowSize(hWnd);
var clientSize = GetWindowClientSize(hWnd);
var isVisible = NativeMethods.IsWindowVisible(hWnd);
var placement = GetWindowPlacement(hWnd);
var threadId = NativeMethods.GetWindowThreadProcessId(hWnd, out var processId);
var process = GetProcessByIdSafely(processId);
var gwlStyle = NativeMethods.GetWindowLong(hWnd, NativeConstants.GWL_STYLE);
var gwlExstyle = NativeMethods.GetWindowLong(hWnd, NativeConstants.GWL_EXSTYLE);
var gwlUserData = NativeMethods.GetWindowLong(hWnd, NativeConstants.GWL_USERDATA);
var gclStyle = NativeMethods.GetClreplacedLong(hWnd, NativeConstants.GCL_STYLE);
var gclWndproc = NativeMethods.GetClreplacedLong(hWnd, NativeConstants.GCL_WNDPROC);
var dwlDlgproc = NativeMethods.GetClreplacedLong(hWnd, NativeConstants.DWL_DLGPROC);
var dwlUser = NativeMethods.GetClreplacedLong(hWnd, NativeConstants.DWL_USER);
var windowDetailes = new Dictionary<string, string>();
windowDetailes.Add("GetWindowText", text);
windowDetailes.Add("WM_GETTEXT", wmText);
windowDetailes.Add("GetClreplacedName", clreplacedName);
windowDetailes.Add("RealGetClreplacedName", realWindowClreplaced);
try
{
windowDetailes.Add("Font Name", GetFontName(hWnd));
}
catch
{
}
windowDetailes.Add("Window Handle", $"0x{hWnd.ToInt64():X}");
windowDetailes.Add("Parent Window Handle", hWndParent == IntPtr.Zero ? "-" : $"0x{hWndParent.ToInt64():X}");
windowDetailes.Add("Is Window Visible", isVisible.ToString());
windowDetailes.Add("Window Placement (showCmd)", placement.showCmd.ToString());
windowDetailes.Add("Window Size", $"{size.Width}x{size.Height}");
windowDetailes.Add("Window Client Size", $"{clientSize.Width}x{clientSize.Height}");
try
{
var bounds = GetFrameBounds(hWnd);
windowDetailes.Add("Window Extended Frame Bounds", $"{bounds.Top} {bounds.Right} {bounds.Bottom} {bounds.Left}");
}
catch
{
}
try
{
windowDetailes.Add("Instance", $"0x{process.Modules[0].BaseAddress.ToInt64():X}");
}
catch
{
}
windowDetailes.Add("GCL_WNDPROC", $"0x{gclWndproc:X}");
windowDetailes.Add("DWL_DLGPROC", $"0x{dwlDlgproc:X}");
windowDetailes.Add("GWL_STYLE", $"0x{gwlStyle:X}");
windowDetailes.Add("GCL_STYLE", $"0x{gclStyle:X}");
windowDetailes.Add("GWL_EXSTYLE", $"0x{gwlExstyle:X}");
try
{
var windowInfo = new WINDOW_INFO();
windowInfo.cbSize = Marshal.SizeOf(windowInfo);
if (NativeMethods.GetWindowInfo(hWnd, ref windowInfo))
{
windowDetailes.Add("WindowInfo.ExStyle", $"0x{windowInfo.dwExStyle:X}");
}
}
catch
{
}
try
{
uint key;
Byte alpha;
uint flags;
var result = NativeMethods.GetLayeredWindowAttributes(hWnd, out key, out alpha, out flags);
var layeredWindow = (LayeredWindow)flags;
windowDetailes.Add("LWA_ALPHA", layeredWindow.HasFlag(LayeredWindow.LWA_ALPHA) ? "+" : "-");
windowDetailes.Add("LWA_COLORKEY", layeredWindow.HasFlag(LayeredWindow.LWA_COLORKEY) ? "+" : "-");
}
catch
{
}
windowDetailes.Add("GWL_USERDATA", $"0x{gwlUserData:X}");
windowDetailes.Add("DWL_USER", $"0x{dwlUser:X}");
var processDetailes = new Dictionary<string, string>();
try
{
try
{
processDetailes.Add("Full Path", process.MainModule.FileName);
}
catch
{
var fileNameBuilder = new StringBuilder(1024);
var bufferLength = (uint)fileNameBuilder.Capacity + 1;
var fullPath = NativeMethods.QueryFullProcessImageName(process.Handle, 0, fileNameBuilder, ref bufferLength) ? fileNameBuilder.ToString() : "";
processDetailes.Add("Full Path", fullPath);
}
}
catch
{
}
var processInfo = (WmiProcessInfo)null;
try
{
processInfo = GetWmiProcessInfo(processId);
processDetailes.Add("Command Line", processInfo.CommandLine);
}
catch
{
}
try
{
processDetailes.Add("Started at", $"{process.StartTime:dd.MM.yyyy HH:mm:ss}");
}
catch
{
}
try
{
processDetailes.Add("Owner", processInfo.Owner);
}
catch
{
}
processDetailes.Add("Process Id", processId.ToString());
try
{
var parentProcess = process.GetParentProcess();
processDetailes.Add("Parent Process Id", parentProcess.Id.ToString());
processDetailes.Add("Parent", Path.GetFileName(parentProcess.MainModule.FileName));
}
catch
{
}
processDetailes.Add("Thread Id", threadId.ToString());
try
{
processDetailes.Add("Priority", process.GetProcessPriority().ToString());
}
catch
{
}
try
{
processDetailes.Add("Threads", processInfo.ThreadCount.ToString());
processDetailes.Add("Handles", processInfo.HandleCount.ToString());
processDetailes.Add("Working Set Size", processInfo.WorkingSetSize.ToString());
processDetailes.Add("Virtual Size", processInfo.VirtualSize.ToString());
}
catch
{
}
try
{
var fileVersionInfo = process.MainModule.FileVersionInfo;
processDetailes.Add("Product Name", fileVersionInfo.ProductName);
processDetailes.Add("Copyright", fileVersionInfo.LegalCopyright);
processDetailes.Add("File Version", fileVersionInfo.FileVersion);
processDetailes.Add("Product Version", fileVersionInfo.ProductVersion);
}
catch
{
}
return new WindowInformation(windowDetailes, processDetailes);
}
19
View Source File : QuikDdeServer.cs
License : Apache License 2.0
Project Creator : AlexWan
License : Apache License 2.0
Project Creator : AlexWan
private void PfnTradeStatusCallback(int nMode, ulong nNumber, ulong nOrderNumber, string clreplacedCode,
string secCode, double dPrice, long nQty, double dValue, int nIsSell, IntPtr pTradeDescriptor)
{
try
{
MyTrade trade = new MyTrade();
trade.NumberTrade = nNumber.ToString();
trade.NumberOrderParent = nOrderNumber.ToString();
trade.Price = (decimal)dPrice;
trade.SecurityNameCode = secCode;
if (ServerTime != DateTime.MinValue)
{
trade.Time = ServerTime;
}
else
{
trade.Time = DateTime.Now;
}
trade.Volume = Convert.ToInt32(nQty);
if (_myTrades == null)
{
_myTrades = new List<MyTrade>();
}
if (nIsSell == 0)
{
trade.Side = Side.Buy;
}
else
{
trade.Side = Side.Sell;
}
_myTrades.Add(trade);
if (MyTradeEvent != null)
{
MyTradeEvent(trade);
}
}
catch (Exception error)
{
SendLogMessage(error.ToString(), LogMessageType.Error);
}
}
19
View Source File : QuikDdeServer.cs
License : Apache License 2.0
Project Creator : AlexWan
License : Apache License 2.0
Project Creator : AlexWan
private void PfnOrderStatusCallback(int nMode, int dwTransId, ulong nOrderNum, string clreplacedCode, string secCode,
double dPrice, long l, double dValue, int nIsSell, int nStatus, IntPtr pOrderDescriptor)
{
try
{
if (dwTransId == 0)
{
return;
}
Order order = new Order();
order.SecurityNameCode = secCode;
order.ServerType = ServerType.QuikDde;
order.Price = (decimal)dPrice;
//order.Volume = (int)dValue;
Order oldOrder = GetOrderFromUserId(dwTransId.ToString());
if (oldOrder != null)
{
order.Volume = oldOrder.Volume;
}
order.NumberUser = dwTransId;
order.NumberMarket = nOrderNum.ToString();
order.SecurityNameCode = secCode;
Order originOrder = _allOrders.Find(ord => ord.NumberUser == order.NumberUser);
if (originOrder != null)
{
order.PortfolioNumber = originOrder.PortfolioNumber;
}
if (ServerTime != DateTime.MinValue)
{
order.TimeCallBack = ServerTime;
}
else
{
order.TimeCallBack = DateTime.Now;
}
if (nIsSell == 0)
{
order.Side = Side.Buy;
}
else
{
order.Side = Side.Sell;
}
if (nStatus == 1)
{
order.State = OrderStateType.Activ;
}
else if (nStatus == 2)
{
order.State = OrderStateType.Cancel;
order.TimeCancel = order.TimeCallBack;
}
else
{
order.State = OrderStateType.Done;
order.TimeDone = order.TimeCallBack;
}
SetOrder(order);
if (MyOrderEvent != null)
{
MyOrderEvent(order);
}
if (_myTrades != null &&
_myTrades.Count != 0)
{
List<MyTrade> myTrade =
_myTrades.FindAll(trade => trade.NumberOrderParent == order.NumberMarket);
for (int tradeNum = 0; tradeNum < myTrade.Count; tradeNum++)
{
if (MyTradeEvent != null)
{
MyTradeEvent(myTrade[tradeNum]);
}
}
}
}
catch (Exception error)
{
SendLogMessage(error.ToString(), LogMessageType.Error);
}
}
19
View Source File : VotingUI.cs
License : MIT License
Project Creator : andruzzzhka
License : MIT License
Project Creator : andruzzzhka
private IEnumerator VoteWithSteamID(bool upvote)
{
if (!SteamManager.Initialized)
{
Plugin.log.Error($"SteamManager is not initialized!");
}
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
Plugin.log.Info($"Getting a ticket...");
var steamId = SteamUser.GetSteamID();
string authTicketHexString = "";
byte[] authTicket = new byte[1024];
var authTicketResult = SteamUser.GetAuthSessionTicket(authTicket, 1024, out var length);
if (authTicketResult != HAuthTicket.Invalid)
{
var beginAuthSessionResult = SteamUser.BeginAuthSession(authTicket, (int)length, steamId);
switch (beginAuthSessionResult)
{
case EBeginAuthSessionResult.k_EBeginAuthSessionResultOK:
var result = SteamUser.UserHasLicenseForApp(steamId, new AppId_t(620980));
SteamUser.EndAuthSession(steamId);
switch (result)
{
case EUserHasLicenseForAppResult.k_EUserHasLicenseResultDoesNotHaveLicense:
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "User does not\nhave license";
yield break;
case EUserHasLicenseForAppResult.k_EUserHasLicenseResultHasLicense:
if(SteamHelper.m_GetAuthSessionTicketResponse == null)
SteamHelper.m_GetAuthSessionTicketResponse = Callback<GetAuthSessionTicketResponse_t>.Create(OnAuthTicketResponse);
SteamHelper.lastTicket = SteamUser.GetAuthSessionTicket(authTicket, 1024, out length);
if (SteamHelper.lastTicket != HAuthTicket.Invalid)
{
Array.Resize(ref authTicket, (int)length);
authTicketHexString = BitConverter.ToString(authTicket).Replace("-", "");
}
break;
case EUserHasLicenseForAppResult.k_EUserHasLicenseResultNoAuth:
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "User is not\nauthenticated";
yield break;
}
break;
default:
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "Auth\nfailed";
yield break;
}
}
Plugin.log.Info("Waiting for Steam callback...");
float startTime = Time.time;
yield return new WaitWhile(() => { return SteamHelper.lastTicketResult != EResult.k_EResultOK && (Time.time - startTime) < 20f; });
if(SteamHelper.lastTicketResult != EResult.k_EResultOK)
{
Plugin.log.Error($"Auth ticket callback timeout");
_upvoteButton.interactable = true;
_downvoteButton.interactable = true;
_ratingText.text = "Callback\ntimeout";
yield break;
}
SteamHelper.lastTicketResult = EResult.k_EResultRevoked;
Plugin.log.Info($"Voting...");
Dictionary<string, string> formData = new Dictionary<string, string> ();
formData.Add("id", steamId.m_SteamID.ToString());
formData.Add("ticket", authTicketHexString);
UnityWebRequest voteWWW = UnityWebRequest.Post($"{PluginConfig.beatsaverURL}/api/songs/voteById/{_lastBeatSaverSong.id}/{(upvote ? 1 : 0)}", formData);
voteWWW.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");
voteWWW.timeout = 30;
yield return voteWWW.SendWebRequest();
if (voteWWW.isNetworkError)
{
Plugin.log.Error(voteWWW.error);
_ratingText.text = voteWWW.error;
}
else
{
if (!_firstVote)
{
yield return new WaitForSecondsRealtime(2f);
}
_firstVote = false;
switch (voteWWW.responseCode)
{
case 200:
{
JSONNode node = JSON.Parse(voteWWW.downloadHandler.text);
_ratingText.text = (int.Parse(node["upVotes"]) - int.Parse(node["downVotes"])).ToString();
if (upvote)
{
_upvoteButton.interactable = false;
_downvoteButton.interactable = true;
}
else
{
_downvoteButton.interactable = false;
_upvoteButton.interactable = true;
}
if (!PluginConfig.votedSongs.ContainsKey(_lastLevel.levelID.Substring(0, 32)))
{
PluginConfig.votedSongs.Add(_lastLevel.levelID.Substring(0, 32), new SongVote(_lastBeatSaverSong.id, upvote ? VoteType.Upvote : VoteType.Downvote));
PluginConfig.SaveConfig();
}
else if (PluginConfig.votedSongs[_lastLevel.levelID.Substring(0, 32)].voteType != (upvote ? VoteType.Upvote : VoteType.Downvote))
{
PluginConfig.votedSongs[_lastLevel.levelID.Substring(0, 32)] = new SongVote(_lastBeatSaverSong.id, upvote ? VoteType.Upvote : VoteType.Downvote);
PluginConfig.SaveConfig();
}
}; break;
case 500:
{
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "Steam API\nerror";
Plugin.log.Error("Error: " + voteWWW.downloadHandler.text);
}; break;
case 401:
{
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "Invalid\nauth ticket";
Plugin.log.Error("Error: " + voteWWW.downloadHandler.text);
}; break;
case 403:
{
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "Steam ID\nmismatch";
Plugin.log.Error("Error: " + voteWWW.downloadHandler.text);
}; break;
case 400:
{
_upvoteButton.interactable = false;
_downvoteButton.interactable = false;
_ratingText.text = "Bad\nrequest";
Plugin.log.Error("Error: "+voteWWW.downloadHandler.text);
}; break;
default:
{
_upvoteButton.interactable = true;
_downvoteButton.interactable = true;
_ratingText.text = "Error\n" + voteWWW.responseCode;
Plugin.log.Error("Error: " + voteWWW.downloadHandler.text);
}; break;
}
}
}
19
View Source File : WebSocketFrame.cs
License : MIT License
Project Creator : andruzzzhka
License : MIT License
Project Creator : andruzzzhka
private static string print (WebSocketFrame frame)
{
// Payload Length
var payloadLen = frame._payloadLength;
// Extended Payload Length
var extPayloadLen = payloadLen > 125 ? frame.FullPayloadLength.ToString () : String.Empty;
// Masking Key
var maskingKey = BitConverter.ToString (frame._maskingKey);
// Payload Data
var payload = payloadLen == 0
? String.Empty
: payloadLen > 125
? "---"
: frame.IsText && !(frame.IsFragment || frame.IsMasked || frame.IsCompressed)
? frame._payloadData.ApplicationData.UTF8Decode ()
: frame._payloadData.ToString ();
var fmt = @"
FIN: {0}
RSV1: {1}
RSV2: {2}
RSV3: {3}
Opcode: {4}
MASK: {5}
Payload Length: {6}
Extended Payload Length: {7}
Masking Key: {8}
Payload Data: {9}";
return String.Format (
fmt,
frame._fin,
frame._rsv1,
frame._rsv2,
frame._rsv3,
frame._opcode,
frame._mask,
payloadLen,
extPayloadLen,
maskingKey,
payload);
}
19
View Source File : SpotifyAccountsService.cs
License : GNU Affero General Public License v3.0
Project Creator : asmejkal
License : GNU Affero General Public License v3.0
Project Creator : asmejkal
public Task RemoveUserAccountAsync(ulong userId, CancellationToken ct)
{
var account = new SpotifyAccount()
{
UserId = userId.ToString(),
ParreplacedionKey = "root",
RowKey = userId.ToString(),
ETag = "*"
};
return Table.ExecuteAsync(TableOperation.Delete(account));
}
19
View Source File : SpotifyAccountsService.cs
License : GNU Affero General Public License v3.0
Project Creator : asmejkal
License : GNU Affero General Public License v3.0
Project Creator : asmejkal
public async Task<SpotifyAccount> GetUserAccountAsync(ulong userId, CancellationToken ct)
{
var filter = TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, userId.ToString());
var results = await Table.ExecuteQueryAsync(new TableQuery<SpotifyAccount>().Where(filter), ct);
if (!results.Any())
return null;
return results.Single();
}
19
View Source File : SpotifyController.cs
License : GNU Affero General Public License v3.0
Project Creator : asmejkal
License : GNU Affero General Public License v3.0
Project Creator : asmejkal
[Authorize]
public async Task<IActionResult> ConnectLanding()
{
_logger.LogInformation("Received Spotify OAuth2 authorization code");
if (!Request.Cookies.TryGetValue("SpotifyOAuth2State", out var state))
return BadRequest("Your session has expired, please try again.");
Response.Cookies.Delete("SpotifyOAuth2State");
if (Request.Query["state"] != state)
return BadRequest("Invalid state");
var userIdClaim = User.FindFirst(c => c.Type == ClaimTypes.NameIdentifier)?.Value;
var userNameClaim = User.FindFirst(c => c.Type == ClaimTypes.Name)?.Value;
var id = DecodeState(state);
if (id != ulong.Parse(userIdClaim))
return BadRequest("Invalid user");
if (Request.Query.ContainsKey("error"))
{
_logger.LogError($"Spotify OAuth2 authorization code error: {Request.Query["error"]}");
return BadRequest("Spotify returned an error.");
}
if (!Request.Query.TryGetValue("code", out var code))
{
_logger.LogError($"Spotify OAuth2 authorization code missing");
return BadRequest("Spotify returned an invalid response.");
}
string refreshToken;
using (var request = new HttpRequestMessage(HttpMethod.Post, "https://accounts.spotify.com/api/token"))
{
var content = new Dictionary<string, string>()
{
{ "grant_type", "authorization_code" },
{ "code", code },
{ "redirect_uri", GetSpotifyRedirectUri() },
{ "client_id", Environment.GetEnvironmentVariable("SpotifyClientId") },
{ "client_secret", Environment.GetEnvironmentVariable("SpotifyClientSecret") },
};
request.Content = new FormUrlEncodedContent(content);
using (var response = await _httpClientFactory.CreateClient().SendAsync(request))
{
if (!response.IsSuccessStatusCode)
{
_logger.LogError($"Failed to get Spotify token: {response.StatusCode}");
return Error();
}
var result = JObject.Parse(await response.Content.ReadreplacedtringAsync());
refreshToken = (string)result["refresh_token"];
if (refreshToken == null)
{
_logger.LogError($"Didn't receive Spotify token");
return Error();
}
}
}
var account = new SpotifyAccount()
{
UserId = id.ToString(),
RefreshToken = refreshToken
};
var options = Options.Create(new DatabaseOptions() { TableStorageConnectionString = Environment.GetEnvironmentVariable("TableStorageConnectionString") });
var service = new SpotifyAccountsService(options);
await service.AddOrUpdateUserAccountAsync(account, CancellationToken.None);
ViewData["UserName"] = userNameClaim;
return View();
}
19
View Source File : EtherScanApi.cs
License : GNU General Public License v3.0
Project Creator : atomex-me
License : GNU General Public License v3.0
Project Creator : atomex-me
private static string BlockNumberToStr(ulong blockNumber)
{
if (blockNumber == ulong.MaxValue)
return "latest";
// "earlest" and "pending" not supported by EtherScan yet
return blockNumber.ToString();
}
19
View Source File : ConsoleImpl.cs
License : BSD 3-Clause "New" or "Revised" License
Project Creator : aura-systems
License : BSD 3-Clause "New" or "Revised" License
Project Creator : aura-systems
public static void Write(ulong aLong) => Write(aLong.ToString());
19
View Source File : ConsoleImpl.cs
License : BSD 3-Clause "New" or "Revised" License
Project Creator : aura-systems
License : BSD 3-Clause "New" or "Revised" License
Project Creator : aura-systems
public static void WriteLine(ulong aLong) => WriteLine(aLong.ToString());
19
View Source File : WindowsSourceFactory.cs
License : Apache License 2.0
Project Creator : awslabs
License : Apache License 2.0
Project Creator : awslabs
public ISource CreateInstance(string entry, IPlugInContext context)
{
var config = context.Configuration;
if (!OperatingSystem.IsWindows())
{
throw new PlatformNotSupportedException($"Source type '{entry}' is only supported on Windows");
}
switch (entry.ToLowerInvariant())
{
case WINDOWS_EVENT_LOG_POLLING_SOURCE:
var pollingOptions = new WindowsEventLogPollingSourceOptions();
ParseWindowsEventLogSourceOptions(config, pollingOptions);
ParseEventLogPollingSourceOptions(config, pollingOptions);
var weps = new WindowsEventPollingSource(config[ConfigConstants.ID],
config["LogName"], config["Query"], context.BookmarkManager, pollingOptions, context);
return weps;
case WINDOWS_EVENT_LOG_SOURCE:
var eventOpts = new WindowsEventLogSourceOptions();
ParseWindowsEventLogSourceOptions(config, eventOpts);
var source = new EventLogSource(config[ConfigConstants.ID], config["LogName"], config["Query"],
context.BookmarkManager, eventOpts, context);
return source;
case WINDOWS_PERFORMANCE_COUNTER_SOURCE:
var performanceCounterSource = new PerformanceCounterSource(context);
return performanceCounterSource;
case WINDOWS_ETW_EVENT_SOURCE:
var providerName = config["ProviderName"];
var traceLevelString = DefaultMissingConfig(config["TraceLevel"], "Verbose");
var matchAnyKeywordString = DefaultMissingConfig(config["MatchAnyKeyword"], ulong.MaxValue.ToString());
if (string.IsNullOrWhiteSpace(providerName))
{
throw new Exception($"A provider name must be specified for the WindowsEtwEventSource.");
}
TraceEventLevel traceLevel;
ulong matchAnyKeyword;
if (!Enum.TryParse<TraceEventLevel>(traceLevelString, out traceLevel))
{
var validNames = string.Join(", ", Enum.GetNames(typeof(TraceEventLevel)));
throw new Exception($"{traceLevelString} is not a valid trace level value ({validNames}) for the WindowsEtwEventSource.");
}
matchAnyKeyword = ParseMatchAnyKeyword(matchAnyKeywordString);
var eventSource = new EtwEventSource(providerName, traceLevel, matchAnyKeyword, context);
return eventSource;
default:
throw new Exception($"Source type {entry} not recognized.");
}
}
19
View Source File : SceneManagerEnumerator.cs
License : GNU Lesser General Public License v2.1
Project Creator : axiom3d
License : GNU Lesser General Public License v2.1
Project Creator : axiom3d
public SceneManager CreateSceneManager(SceneType sceneType, string instanceName)
{
if (this._instances.ContainsKey(instanceName))
{
throw new AxiomException("SceneManager instance called '{0}' already exists", instanceName);
}
SceneManager instance = null;
if (instanceName == string.Empty)
{
instanceName = "SceneManagerInstance" + (++this._instanceCreateCount).ToString();
}
// iterate backwards to find the matching factory registered last
for (var i = this._factories.Count - 1; i > -1; i--)
{
if ((this._factories[i].MetaData.sceneTypeMask & sceneType) > 0)
{
instance = this._factories[i].CreateInstance(instanceName);
break;
}
}
// use default factory if none
if (instance == null)
{
instance = this._defaultFactory.CreateInstance(instanceName);
}
// replacedign render system if already configured
if (this._currentRenderSystem != null)
{
instance.TargetRenderSystem = this._currentRenderSystem;
}
this._instances.Add(instanceName, instance);
return instance;
}
19
View Source File : SceneManagerEnumerator.cs
License : GNU Lesser General Public License v2.1
Project Creator : axiom3d
License : GNU Lesser General Public License v2.1
Project Creator : axiom3d
public SceneManager CreateSceneManager(string typeName, string instanceName)
{
if (this._instances.ContainsKey(instanceName))
{
throw new AxiomException("SceneManager instance called '{0}' already exists", instanceName);
}
SceneManager instance = null;
foreach (var factory in this._factories)
{
if (factory.MetaData.typeName == typeName)
{
if (instanceName == string.Empty)
{
instanceName = "SceneManagerInstance" + (++this._instanceCreateCount).ToString();
}
instance = factory.CreateInstance(instanceName);
break;
}
}
if (instance == null)
{
throw new AxiomException("No factory found for scene manager of type '{0}'", typeName);
}
// replacedign render system if already configured
if (this._currentRenderSystem != null)
{
instance.TargetRenderSystem = this._currentRenderSystem;
}
this._instances.Add(instance.Name, instance);
return instance;
}
19
View Source File : GdidAuthorityServiceBase.cs
License : MIT License
Project Creator : azist
License : MIT License
Project Creator : azist
public override string ToString()
{
return Era.ToString()+SEPARATOR+Value.ToString();
}
19
View Source File : CacheTest.cs
License : MIT License
Project Creator : azist
License : MIT License
Project Creator : azist
private void button2_Click(object sender, EventArgs e)
{
var cache = System.Runtime.Caching.MemoryCache.Default;
var rnd = new Random();
var ridx = new ulong[0xffff];
for(var i=0; i< ridx.Length; i++)
ridx[i] = (ulong)rnd.Next(Int32.MaxValue);
object rec = null;
const int CNT = 40000000;
ulong id = (ulong)tbID.Text.AsLong();
var watch = Stopwatch.StartNew();
Parallel.For(0, CNT,(i)=> rec = cache.Get((ridx[i%0xffff]+(ulong)i).ToString()) );
rec = cache.Get(id.ToString());
var elapsed = watch.ElapsedMilliseconds;
Text = "MSft Found {0} {1:n2} times in {2:n2} ms. Store count {3:n2} {4:n2} {5:N1}op/sec".Args(rec!=null,
CNT,
elapsed,
cache.GetCount(),
rec!=null?((SomeHuman)rec).LastName:"",
(int)(CNT / (elapsed/1000d))
);
}
19
View Source File : PileForm.cs
License : MIT License
Project Creator : azist
License : MIT License
Project Creator : azist
public static Person2 MakeFake2()
{
return new Person2
{
ID = new GDID(0, 0, _id++),
FirstName = "Adam-"+_id.ToString(),
LastName = "Lokomaz-"+_id.ToString(),
DOB = _id%7==0 ? (DateTime?)null : DateTime.UtcNow,
Balance = 2131m,
Data = new float[]{1f, 2f, 3f},
Flag1 = true,
Flag2 = true,
Int1 = (int)_id,
Int2 = (int)_id,
Int3 = (int)_id,
Long1 = 123,
Long2 = (long)_id,
Long3 = 134324324334,
S1 = "This is a very long and longer and long line of text that takes many bytes indeed it does but how does it affect perf?"
/*ObjectArray = new object[]{ Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
Person.MakeFake(), new object[]{Person.MakeFake()}, Person.MakeFake(), Person.MakeFake(), Person.MakeFake(), Person.MakeFake(),
1, true, "dausyhiduhaiushdahsuidhuia", false, null, null, null }
*/
};
}
19
View Source File : TextExt.cs
License : MIT License
Project Creator : baba-s
License : MIT License
Project Creator : baba-s
public static void SetText( this Text self, ulong value ) { self.SetText( value .ToString() ); }
19
View Source File : PropVariantFacade.cs
License : MIT License
Project Creator : Bassman2
License : MIT License
Project Creator : Bassman2
public override string ToString()
{
switch (this.Value.vt)
{
case PropVariantType.VT_LPSTR:
return Marshal.PtrToStringAnsi(this.Value.ptrVal);
case PropVariantType.VT_LPWSTR:
return Marshal.PtrToStringUni(this.Value.ptrVal);
case PropVariantType.VT_BSTR:
return Marshal.PtrToStringBSTR(this.Value.ptrVal);
case PropVariantType.VT_CLSID:
return ToGuid().ToString();
case PropVariantType.VT_DATE:
return ToDate().ToString();
case PropVariantType.VT_BOOL:
return ToBool().ToString();
case PropVariantType.VT_INT:
case PropVariantType.VT_I1:
case PropVariantType.VT_I2:
case PropVariantType.VT_I4:
return ToInt().ToString();
case PropVariantType.VT_UINT:
case PropVariantType.VT_UI1:
case PropVariantType.VT_UI2:
case PropVariantType.VT_UI4:
return ToUInt().ToString();
case PropVariantType.VT_I8:
return ToLong().ToString();
case PropVariantType.VT_UI8:
return ToUlong().ToString();
case PropVariantType.VT_ERROR:
Debug.WriteLine($"VT_ERROR: 0x{this.Value.errorCode:X}");
return "";
default:
return "";
}
}
19
View Source File : FilesystemThreadConsumer.cs
License : MIT License
Project Creator : bbepis
License : MIT License
Project Creator : bbepis
public Task ThreadUntracked(ulong threadId, string board, bool deleted)
{
if (deleted)
{
string threadFileName = Path.Combine(ArchiveDirectory, board, threadId.ToString(), "thread.json");
var thread = ReadJson(threadFileName);
thread.IsDeleted = true;
WriteJson(threadFileName, thread);
}
// ConsumeThread is always called with the archive flag before calling this method, so we don't need to worry about setting the archived flag
return Task.CompletedTask;
}
19
View Source File : ControllerDigitalActionHandle_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_ControllerDigitalActionHandle.ToString();
}
19
View Source File : ControllerHandle_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_ControllerHandle.ToString();
}
19
View Source File : PublishedFileId_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_PublishedFileId.ToString();
}
19
View Source File : PublishedFileUpdateHandle_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_PublishedFileUpdateHandle.ToString();
}
19
View Source File : SteamItemInstanceID_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_SteamItemInstanceID.ToString();
}
19
View Source File : ManifestId_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_ManifestId.ToString();
}
19
View Source File : CGameID.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_GameID.ToString();
}
19
View Source File : CSteamID.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_SteamID.ToString();
}
19
View Source File : ControllerActionSetHandle_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_ControllerActionSetHandle.ToString();
}
19
View Source File : ControllerAnalogActionHandle_t.cs
License : MIT License
Project Creator : benotter
License : MIT License
Project Creator : benotter
public override string ToString() {
return m_ControllerreplacedogActionHandle.ToString();
}
See More Examples