This commit is contained in:
watrabi
2025-09-18 17:55:52 -04:00
commit 977f1ff4b8
15030 changed files with 17324420 additions and 0 deletions
@@ -0,0 +1,263 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache
*.suo
# Include dlls if theyre in the NuGet packages directory
!/packages/*/lib/*.dll
# Include dlls if they're in the CommonReferences directory
!*CommonReferences/*.dll
####################
# VS Upgrade stuff #
####################
_UpgradeReport_Files/
###############
# Directories #
###############
bin/
obj/
TestResults/
###################
# Web publish log #
###################
*.Publish.xml
#############
# Resharper #
#############
/_ReSharper.*
*.ReSharper.*
############
# Packages #
############
# its better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
######################
# Logs and databases #
######################
*.log
*.sqlite
# OS generated files #
######################
.DS_Store?
ehthumbs.db
Icon?
Thumbs.db
# User-specific files
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studo 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
@@ -0,0 +1,565 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Roblox.Grid.Arbiter.Common.Arbiter
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace = "http://roblox.com/", ConfigurationName = "Roblox.Grid.Arbiter.Common.Arbiter.Arbiter")]
public interface Arbiter
{
[System.ServiceModel.OperationContractAttribute(Action = "http://roblox.com/Arbiter/GetStatsEx", ReplyAction = "http://roblox.com/Arbiter/GetStatsExResponse")]
string GetStatsEx(bool clearExceptions);
[System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://roblox.com/Arbiter/GetStatsEx", ReplyAction = "http://roblox.com/Arbiter/GetStatsExResponse")]
System.IAsyncResult BeginGetStatsEx(bool clearExceptions, System.AsyncCallback callback, object asyncState);
string EndGetStatsEx(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(Action = "http://roblox.com/Arbiter/GetStats", ReplyAction = "http://roblox.com/Arbiter/GetStatsResponse")]
string GetStats();
[System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://roblox.com/Arbiter/GetStats", ReplyAction = "http://roblox.com/Arbiter/GetStatsResponse")]
System.IAsyncResult BeginGetStats(System.AsyncCallback callback, object asyncState);
string EndGetStats(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(Action = "http://roblox.com/Arbiter/SetMultiProcess", ReplyAction = "http://roblox.com/Arbiter/SetMultiProcessResponse")]
void SetMultiProcess(bool value);
[System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetMultiProcess", ReplyAction = "http://roblox.com/Arbiter/SetMultiProcessResponse")]
System.IAsyncResult BeginSetMultiProcess(bool value, System.AsyncCallback callback, object asyncState);
void EndSetMultiProcess(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(Action = "http://roblox.com/Arbiter/SetRecycleProcess", ReplyAction = "http://roblox.com/Arbiter/SetRecycleProcessResponse")]
void SetRecycleProcess(bool value);
[System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetRecycleProcess", ReplyAction = "http://roblox.com/Arbiter/SetRecycleProcessResponse")]
System.IAsyncResult BeginSetRecycleProcess(bool value, System.AsyncCallback callback, object asyncState);
void EndSetRecycleProcess(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(Action = "http://roblox.com/Arbiter/SetThreadConfigScript", ReplyAction = "http://roblox.com/Arbiter/SetThreadConfigScriptResponse")]
void SetThreadConfigScript(string script, bool broadcast);
[System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetThreadConfigScript", ReplyAction = "http://roblox.com/Arbiter/SetThreadConfigScriptResponse")]
System.IAsyncResult BeginSetThreadConfigScript(string script, bool broadcast, System.AsyncCallback callback, object asyncState);
void EndSetThreadConfigScript(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(Action = "http://roblox.com/Arbiter/SetRecycleQueueSize", ReplyAction = "http://roblox.com/Arbiter/SetRecycleQueueSizeResponse")]
void SetRecycleQueueSize(int value);
[System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetRecycleQueueSize", ReplyAction = "http://roblox.com/Arbiter/SetRecycleQueueSizeResponse")]
System.IAsyncResult BeginSetRecycleQueueSize(int value, System.AsyncCallback callback, object asyncState);
void EndSetRecycleQueueSize(System.IAsyncResult result);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface ArbiterChannel : Roblox.Grid.Arbiter.Common.Arbiter.Arbiter, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class GetStatsExCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
public GetStatsExCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
public string Result
{
get
{
base.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class GetStatsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
public GetStatsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
public string Result
{
get
{
base.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class ArbiterClient : System.ServiceModel.ClientBase<Roblox.Grid.Arbiter.Common.Arbiter.Arbiter>, Roblox.Grid.Arbiter.Common.Arbiter.Arbiter
{
private BeginOperationDelegate onBeginGetStatsExDelegate;
private EndOperationDelegate onEndGetStatsExDelegate;
private System.Threading.SendOrPostCallback onGetStatsExCompletedDelegate;
private BeginOperationDelegate onBeginGetStatsDelegate;
private EndOperationDelegate onEndGetStatsDelegate;
private System.Threading.SendOrPostCallback onGetStatsCompletedDelegate;
private BeginOperationDelegate onBeginSetMultiProcessDelegate;
private EndOperationDelegate onEndSetMultiProcessDelegate;
private System.Threading.SendOrPostCallback onSetMultiProcessCompletedDelegate;
private BeginOperationDelegate onBeginSetRecycleProcessDelegate;
private EndOperationDelegate onEndSetRecycleProcessDelegate;
private System.Threading.SendOrPostCallback onSetRecycleProcessCompletedDelegate;
private BeginOperationDelegate onBeginSetThreadConfigScriptDelegate;
private EndOperationDelegate onEndSetThreadConfigScriptDelegate;
private System.Threading.SendOrPostCallback onSetThreadConfigScriptCompletedDelegate;
private BeginOperationDelegate onBeginSetRecycleQueueSizeDelegate;
private EndOperationDelegate onEndSetRecycleQueueSizeDelegate;
private System.Threading.SendOrPostCallback onSetRecycleQueueSizeCompletedDelegate;
public ArbiterClient()
{
}
public ArbiterClient(string endpointConfigurationName) :
base(endpointConfigurationName)
{
}
public ArbiterClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}
public ArbiterClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}
public ArbiterClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public event System.EventHandler<GetStatsExCompletedEventArgs> GetStatsExCompleted;
public event System.EventHandler<GetStatsCompletedEventArgs> GetStatsCompleted;
public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> SetMultiProcessCompleted;
public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> SetRecycleProcessCompleted;
public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> SetThreadConfigScriptCompleted;
public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> SetRecycleQueueSizeCompleted;
public string GetStatsEx(bool clearExceptions)
{
return base.Channel.GetStatsEx(clearExceptions);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.IAsyncResult BeginGetStatsEx(bool clearExceptions, System.AsyncCallback callback, object asyncState)
{
return base.Channel.BeginGetStatsEx(clearExceptions, callback, asyncState);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public string EndGetStatsEx(System.IAsyncResult result)
{
return base.Channel.EndGetStatsEx(result);
}
private System.IAsyncResult OnBeginGetStatsEx(object[] inValues, System.AsyncCallback callback, object asyncState)
{
bool clearExceptions = ((bool)(inValues[0]));
return this.BeginGetStatsEx(clearExceptions, callback, asyncState);
}
private object[] OnEndGetStatsEx(System.IAsyncResult result)
{
string retVal = this.EndGetStatsEx(result);
return new object[] {
retVal};
}
private void OnGetStatsExCompleted(object state)
{
if ((this.GetStatsExCompleted != null))
{
InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
this.GetStatsExCompleted(this, new GetStatsExCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
}
}
public void GetStatsExAsync(bool clearExceptions)
{
this.GetStatsExAsync(clearExceptions, null);
}
public void GetStatsExAsync(bool clearExceptions, object userState)
{
if ((this.onBeginGetStatsExDelegate == null))
{
this.onBeginGetStatsExDelegate = new BeginOperationDelegate(this.OnBeginGetStatsEx);
}
if ((this.onEndGetStatsExDelegate == null))
{
this.onEndGetStatsExDelegate = new EndOperationDelegate(this.OnEndGetStatsEx);
}
if ((this.onGetStatsExCompletedDelegate == null))
{
this.onGetStatsExCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetStatsExCompleted);
}
base.InvokeAsync(this.onBeginGetStatsExDelegate, new object[] {
clearExceptions}, this.onEndGetStatsExDelegate, this.onGetStatsExCompletedDelegate, userState);
}
public string GetStats()
{
return base.Channel.GetStats();
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.IAsyncResult BeginGetStats(System.AsyncCallback callback, object asyncState)
{
return base.Channel.BeginGetStats(callback, asyncState);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public string EndGetStats(System.IAsyncResult result)
{
return base.Channel.EndGetStats(result);
}
private System.IAsyncResult OnBeginGetStats(object[] inValues, System.AsyncCallback callback, object asyncState)
{
return this.BeginGetStats(callback, asyncState);
}
private object[] OnEndGetStats(System.IAsyncResult result)
{
string retVal = this.EndGetStats(result);
return new object[] {
retVal};
}
private void OnGetStatsCompleted(object state)
{
if ((this.GetStatsCompleted != null))
{
InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
this.GetStatsCompleted(this, new GetStatsCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
}
}
public void GetStatsAsync()
{
this.GetStatsAsync(null);
}
public void GetStatsAsync(object userState)
{
if ((this.onBeginGetStatsDelegate == null))
{
this.onBeginGetStatsDelegate = new BeginOperationDelegate(this.OnBeginGetStats);
}
if ((this.onEndGetStatsDelegate == null))
{
this.onEndGetStatsDelegate = new EndOperationDelegate(this.OnEndGetStats);
}
if ((this.onGetStatsCompletedDelegate == null))
{
this.onGetStatsCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetStatsCompleted);
}
base.InvokeAsync(this.onBeginGetStatsDelegate, null, this.onEndGetStatsDelegate, this.onGetStatsCompletedDelegate, userState);
}
public void SetMultiProcess(bool value)
{
base.Channel.SetMultiProcess(value);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.IAsyncResult BeginSetMultiProcess(bool value, System.AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetMultiProcess(value, callback, asyncState);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public void EndSetMultiProcess(System.IAsyncResult result)
{
base.Channel.EndSetMultiProcess(result);
}
private System.IAsyncResult OnBeginSetMultiProcess(object[] inValues, System.AsyncCallback callback, object asyncState)
{
bool value = ((bool)(inValues[0]));
return this.BeginSetMultiProcess(value, callback, asyncState);
}
private object[] OnEndSetMultiProcess(System.IAsyncResult result)
{
this.EndSetMultiProcess(result);
return null;
}
private void OnSetMultiProcessCompleted(object state)
{
if ((this.SetMultiProcessCompleted != null))
{
InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
this.SetMultiProcessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetMultiProcessAsync(bool value)
{
this.SetMultiProcessAsync(value, null);
}
public void SetMultiProcessAsync(bool value, object userState)
{
if ((this.onBeginSetMultiProcessDelegate == null))
{
this.onBeginSetMultiProcessDelegate = new BeginOperationDelegate(this.OnBeginSetMultiProcess);
}
if ((this.onEndSetMultiProcessDelegate == null))
{
this.onEndSetMultiProcessDelegate = new EndOperationDelegate(this.OnEndSetMultiProcess);
}
if ((this.onSetMultiProcessCompletedDelegate == null))
{
this.onSetMultiProcessCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSetMultiProcessCompleted);
}
base.InvokeAsync(this.onBeginSetMultiProcessDelegate, new object[] {
value}, this.onEndSetMultiProcessDelegate, this.onSetMultiProcessCompletedDelegate, userState);
}
public void SetRecycleProcess(bool value)
{
base.Channel.SetRecycleProcess(value);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.IAsyncResult BeginSetRecycleProcess(bool value, System.AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetRecycleProcess(value, callback, asyncState);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public void EndSetRecycleProcess(System.IAsyncResult result)
{
base.Channel.EndSetRecycleProcess(result);
}
private System.IAsyncResult OnBeginSetRecycleProcess(object[] inValues, System.AsyncCallback callback, object asyncState)
{
bool value = ((bool)(inValues[0]));
return this.BeginSetRecycleProcess(value, callback, asyncState);
}
private object[] OnEndSetRecycleProcess(System.IAsyncResult result)
{
this.EndSetRecycleProcess(result);
return null;
}
private void OnSetRecycleProcessCompleted(object state)
{
if ((this.SetRecycleProcessCompleted != null))
{
InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
this.SetRecycleProcessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetRecycleProcessAsync(bool value)
{
this.SetRecycleProcessAsync(value, null);
}
public void SetRecycleProcessAsync(bool value, object userState)
{
if ((this.onBeginSetRecycleProcessDelegate == null))
{
this.onBeginSetRecycleProcessDelegate = new BeginOperationDelegate(this.OnBeginSetRecycleProcess);
}
if ((this.onEndSetRecycleProcessDelegate == null))
{
this.onEndSetRecycleProcessDelegate = new EndOperationDelegate(this.OnEndSetRecycleProcess);
}
if ((this.onSetRecycleProcessCompletedDelegate == null))
{
this.onSetRecycleProcessCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSetRecycleProcessCompleted);
}
base.InvokeAsync(this.onBeginSetRecycleProcessDelegate, new object[] {
value}, this.onEndSetRecycleProcessDelegate, this.onSetRecycleProcessCompletedDelegate, userState);
}
public void SetThreadConfigScript(string script, bool broadcast)
{
base.Channel.SetThreadConfigScript(script, broadcast);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.IAsyncResult BeginSetThreadConfigScript(string script, bool broadcast, System.AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetThreadConfigScript(script, broadcast, callback, asyncState);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public void EndSetThreadConfigScript(System.IAsyncResult result)
{
base.Channel.EndSetThreadConfigScript(result);
}
private System.IAsyncResult OnBeginSetThreadConfigScript(object[] inValues, System.AsyncCallback callback, object asyncState)
{
string script = ((string)(inValues[0]));
bool broadcast = ((bool)(inValues[1]));
return this.BeginSetThreadConfigScript(script, broadcast, callback, asyncState);
}
private object[] OnEndSetThreadConfigScript(System.IAsyncResult result)
{
this.EndSetThreadConfigScript(result);
return null;
}
private void OnSetThreadConfigScriptCompleted(object state)
{
if ((this.SetThreadConfigScriptCompleted != null))
{
InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
this.SetThreadConfigScriptCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetThreadConfigScriptAsync(string script, bool broadcast)
{
this.SetThreadConfigScriptAsync(script, broadcast, null);
}
public void SetThreadConfigScriptAsync(string script, bool broadcast, object userState)
{
if ((this.onBeginSetThreadConfigScriptDelegate == null))
{
this.onBeginSetThreadConfigScriptDelegate = new BeginOperationDelegate(this.OnBeginSetThreadConfigScript);
}
if ((this.onEndSetThreadConfigScriptDelegate == null))
{
this.onEndSetThreadConfigScriptDelegate = new EndOperationDelegate(this.OnEndSetThreadConfigScript);
}
if ((this.onSetThreadConfigScriptCompletedDelegate == null))
{
this.onSetThreadConfigScriptCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSetThreadConfigScriptCompleted);
}
base.InvokeAsync(this.onBeginSetThreadConfigScriptDelegate, new object[] {
script,
broadcast}, this.onEndSetThreadConfigScriptDelegate, this.onSetThreadConfigScriptCompletedDelegate, userState);
}
public void SetRecycleQueueSize(int value)
{
base.Channel.SetRecycleQueueSize(value);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.IAsyncResult BeginSetRecycleQueueSize(int value, System.AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetRecycleQueueSize(value, callback, asyncState);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public void EndSetRecycleQueueSize(System.IAsyncResult result)
{
base.Channel.EndSetRecycleQueueSize(result);
}
private System.IAsyncResult OnBeginSetRecycleQueueSize(object[] inValues, System.AsyncCallback callback, object asyncState)
{
int value = ((int)(inValues[0]));
return this.BeginSetRecycleQueueSize(value, callback, asyncState);
}
private object[] OnEndSetRecycleQueueSize(System.IAsyncResult result)
{
this.EndSetRecycleQueueSize(result);
return null;
}
private void OnSetRecycleQueueSizeCompleted(object state)
{
if ((this.SetRecycleQueueSizeCompleted != null))
{
InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
this.SetRecycleQueueSizeCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetRecycleQueueSizeAsync(int value)
{
this.SetRecycleQueueSizeAsync(value, null);
}
public void SetRecycleQueueSizeAsync(int value, object userState)
{
if ((this.onBeginSetRecycleQueueSizeDelegate == null))
{
this.onBeginSetRecycleQueueSizeDelegate = new BeginOperationDelegate(this.OnBeginSetRecycleQueueSize);
}
if ((this.onEndSetRecycleQueueSizeDelegate == null))
{
this.onEndSetRecycleQueueSizeDelegate = new EndOperationDelegate(this.OnEndSetRecycleQueueSize);
}
if ((this.onSetRecycleQueueSizeCompletedDelegate == null))
{
this.onSetRecycleQueueSizeCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSetRecycleQueueSizeCompleted);
}
base.InvokeAsync(this.onBeginSetRecycleQueueSizeDelegate, new object[] {
value}, this.onEndSetRecycleQueueSizeDelegate, this.onSetRecycleQueueSizeCompletedDelegate, userState);
}
}
}
@@ -0,0 +1,14 @@
using Roblox.Grid.Arbiter.Common.Arbiter;
namespace Roblox.Grid.Arbiter.Common
{
public class ArbiterServiceUtils
{
public static ArbiterClient GetService(string Address) => GetService(Address, 64990);
public static ArbiterClient GetService(string Address, int port)
{
if (Address == null) return null;
return new ArbiterClient("RccServiceMonitor", "http://" + Address + ":" + port.ToString());
}
}
}
@@ -0,0 +1,163 @@
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Collections;
using System.Collections.Generic;
namespace Roblox.Grid.Arbiter.Common
{
public class ArbiterStats : IEnumerable<ArbiterStats.Stat>, IEnumerable
{
IEnumerator IEnumerable.GetEnumerator()
{
foreach (var stat in stats)
yield return stat;
}
IEnumerator<Stat> IEnumerable<Stat>.GetEnumerator()
{
foreach (var stat in stats)
yield return stat;
}
public ArbiterStats()
{
stats = new List<Stat>();
}
public ArbiterStats(string source)
: this()
{
var xmlReader = XmlReader.Create(new StringReader(source));
while (xmlReader.Read())
{
if (!(xmlReader.Name != "Stat"))
{
var stat = default(Stat);
xmlReader.MoveToFirstAttribute();
do
{
if (xmlReader.Name == "Name")
stat.name = xmlReader.Value;
else if (xmlReader.Name == "Value")
stat.value = xmlReader.Value;
}
while (xmlReader.MoveToNextAttribute());
if (stat.name != null && stat.value != null)
stats.Add(stat);
}
}
}
public void AddStat(string name, string value)
{
stats.Add(new ArbiterStats.Stat(name, value));
}
public void AddStat(string name, int value)
{
stats.Add(new ArbiterStats.Stat(name, value.ToString()));
}
public void AddStat(string name, long value)
{
stats.Add(new ArbiterStats.Stat(name, value.ToString()));
}
public void AddStat(string name, double value)
{
stats.Add(new ArbiterStats.Stat(name, value.ToString()));
}
public void AddStat(string name, bool value)
{
stats.Add(new ArbiterStats.Stat(name, value.ToString()));
}
public string GetStat(string name)
{
foreach (var stat in this)
if (stat.name == name)
return stat.value;
throw new Exception("Stat " + name + " is missing");
}
public int GetStatInt(string name)
{
var stat = GetStat(name);
if (int.TryParse(stat, out var result))
return result;
Console.WriteLine("Stat " + name + " was malformed: " + stat);
return 0;
}
public long GetStatLong(string name)
{
var stat = GetStat(name);
if (long.TryParse(stat, out var result))
return result;
Console.WriteLine("Stat " + name + " was malformed: " + stat);
return 0;
}
public double GetStatDouble(string name)
{
var stat = GetStat(name);
if (double.TryParse(stat, out var result))
return result;
Console.WriteLine("Stat " + name + " was malformed: " + stat);
return 0;
}
public override string ToString()
{
var stringBuilder = new StringBuilder();
foreach (var stat in this)
stringBuilder.Append(stat.name + ": " + stat.value + "\r\n");
return stringBuilder.ToString();
}
public string ToXml()
{
var stringBuilder = new StringBuilder();
var xmlWriter = XmlWriter.Create(stringBuilder);
xmlWriter.WriteStartElement("Stats");
foreach (var stat in this)
WriteStat(xmlWriter, stat);
xmlWriter.WriteEndElement();
xmlWriter.Close();
return stringBuilder.ToString();
}
protected static void WriteStat(XmlWriter writer, ArbiterStats.Stat stat)
{
writer.WriteStartElement("Stat");
writer.WriteStartAttribute("Name");
writer.WriteString(stat.name);
writer.WriteEndAttribute();
writer.WriteStartAttribute("Value");
writer.WriteString(stat.value);
writer.WriteEndAttribute();
writer.WriteEndElement();
}
private List<Stat> stats;
public struct Stat
{
internal Stat(string name, string value)
{
this.name = name;
this.value = value;
}
public string name;
public string value;
}
}
}
@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Roblox.Grid.Arbiter.Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Roblox.Grid.Arbiter.Common")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("637353c1-acd0-4145-8bcb-07fb3be73df7")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,58 @@
using System;
using System.CodeDom.Compiler;
using System.ServiceModel;
namespace Roblox.Grid.Arbiter.Common.Arbiter;
[GeneratedCode("System.ServiceModel", "4.0.0.0")]
[ServiceContract(Namespace = "http://roblox.com/", ConfigurationName = "Roblox.Grid.Arbiter.Common.Arbiter.Arbiter")]
public interface Arbiter
{
[OperationContract(Action = "http://roblox.com/Arbiter/GetStatsEx", ReplyAction = "http://roblox.com/Arbiter/GetStatsExResponse")]
string GetStatsEx(bool clearExceptions);
[OperationContract(AsyncPattern = true, Action = "http://roblox.com/Arbiter/GetStatsEx", ReplyAction = "http://roblox.com/Arbiter/GetStatsExResponse")]
IAsyncResult BeginGetStatsEx(bool clearExceptions, AsyncCallback callback, object asyncState);
string EndGetStatsEx(IAsyncResult result);
[OperationContract(Action = "http://roblox.com/Arbiter/GetStats", ReplyAction = "http://roblox.com/Arbiter/GetStatsResponse")]
string GetStats();
[OperationContract(AsyncPattern = true, Action = "http://roblox.com/Arbiter/GetStats", ReplyAction = "http://roblox.com/Arbiter/GetStatsResponse")]
IAsyncResult BeginGetStats(AsyncCallback callback, object asyncState);
string EndGetStats(IAsyncResult result);
[OperationContract(Action = "http://roblox.com/Arbiter/SetMultiProcess", ReplyAction = "http://roblox.com/Arbiter/SetMultiProcessResponse")]
void SetMultiProcess(bool value);
[OperationContract(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetMultiProcess", ReplyAction = "http://roblox.com/Arbiter/SetMultiProcessResponse")]
IAsyncResult BeginSetMultiProcess(bool value, AsyncCallback callback, object asyncState);
void EndSetMultiProcess(IAsyncResult result);
[OperationContract(Action = "http://roblox.com/Arbiter/SetRecycleProcess", ReplyAction = "http://roblox.com/Arbiter/SetRecycleProcessResponse")]
void SetRecycleProcess(bool value);
[OperationContract(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetRecycleProcess", ReplyAction = "http://roblox.com/Arbiter/SetRecycleProcessResponse")]
IAsyncResult BeginSetRecycleProcess(bool value, AsyncCallback callback, object asyncState);
void EndSetRecycleProcess(IAsyncResult result);
[OperationContract(Action = "http://roblox.com/Arbiter/SetThreadConfigScript", ReplyAction = "http://roblox.com/Arbiter/SetThreadConfigScriptResponse")]
void SetThreadConfigScript(string script, bool broadcast);
[OperationContract(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetThreadConfigScript", ReplyAction = "http://roblox.com/Arbiter/SetThreadConfigScriptResponse")]
IAsyncResult BeginSetThreadConfigScript(string script, bool broadcast, AsyncCallback callback, object asyncState);
void EndSetThreadConfigScript(IAsyncResult result);
[OperationContract(Action = "http://roblox.com/Arbiter/SetRecycleQueueSize", ReplyAction = "http://roblox.com/Arbiter/SetRecycleQueueSizeResponse")]
void SetRecycleQueueSize(int value);
[OperationContract(AsyncPattern = true, Action = "http://roblox.com/Arbiter/SetRecycleQueueSize", ReplyAction = "http://roblox.com/Arbiter/SetRecycleQueueSizeResponse")]
IAsyncResult BeginSetRecycleQueueSize(int value, AsyncCallback callback, object asyncState);
void EndSetRecycleQueueSize(IAsyncResult result);
}
@@ -0,0 +1,11 @@
using System;
using System.CodeDom.Compiler;
using System.ServiceModel;
using System.ServiceModel.Channels;
namespace Roblox.Grid.Arbiter.Common.Arbiter;
[GeneratedCode("System.ServiceModel", "4.0.0.0")]
public interface ArbiterChannel : Arbiter, IClientChannel, IContextChannel, IChannel, ICommunicationObject, IExtensibleObject<IContextChannel>, IDisposable
{
}
@@ -0,0 +1,446 @@
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Threading;
namespace Roblox.Grid.Arbiter.Common.Arbiter;
[DebuggerStepThrough]
[GeneratedCode("System.ServiceModel", "4.0.0.0")]
public class ArbiterClient : ClientBase<Arbiter>, Arbiter
{
private BeginOperationDelegate onBeginGetStatsExDelegate;
private EndOperationDelegate onEndGetStatsExDelegate;
private SendOrPostCallback onGetStatsExCompletedDelegate;
private BeginOperationDelegate onBeginGetStatsDelegate;
private EndOperationDelegate onEndGetStatsDelegate;
private SendOrPostCallback onGetStatsCompletedDelegate;
private BeginOperationDelegate onBeginSetMultiProcessDelegate;
private EndOperationDelegate onEndSetMultiProcessDelegate;
private SendOrPostCallback onSetMultiProcessCompletedDelegate;
private BeginOperationDelegate onBeginSetRecycleProcessDelegate;
private EndOperationDelegate onEndSetRecycleProcessDelegate;
private SendOrPostCallback onSetRecycleProcessCompletedDelegate;
private BeginOperationDelegate onBeginSetThreadConfigScriptDelegate;
private EndOperationDelegate onEndSetThreadConfigScriptDelegate;
private SendOrPostCallback onSetThreadConfigScriptCompletedDelegate;
private BeginOperationDelegate onBeginSetRecycleQueueSizeDelegate;
private EndOperationDelegate onEndSetRecycleQueueSizeDelegate;
private SendOrPostCallback onSetRecycleQueueSizeCompletedDelegate;
public event EventHandler<GetStatsExCompletedEventArgs> GetStatsExCompleted;
public event EventHandler<GetStatsCompletedEventArgs> GetStatsCompleted;
public event EventHandler<AsyncCompletedEventArgs> SetMultiProcessCompleted;
public event EventHandler<AsyncCompletedEventArgs> SetRecycleProcessCompleted;
public event EventHandler<AsyncCompletedEventArgs> SetThreadConfigScriptCompleted;
public event EventHandler<AsyncCompletedEventArgs> SetRecycleQueueSizeCompleted;
public ArbiterClient()
{
}
public ArbiterClient(string endpointConfigurationName)
: base(endpointConfigurationName)
{
}
public ArbiterClient(string endpointConfigurationName, string remoteAddress)
: base(endpointConfigurationName, remoteAddress)
{
}
public ArbiterClient(string endpointConfigurationName, EndpointAddress remoteAddress)
: base(endpointConfigurationName, remoteAddress)
{
}
public ArbiterClient(Binding binding, EndpointAddress remoteAddress)
: base(binding, remoteAddress)
{
}
public string GetStatsEx(bool clearExceptions)
{
return base.Channel.GetStatsEx(clearExceptions);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public IAsyncResult BeginGetStatsEx(bool clearExceptions, AsyncCallback callback, object asyncState)
{
return base.Channel.BeginGetStatsEx(clearExceptions, callback, asyncState);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public string EndGetStatsEx(IAsyncResult result)
{
return base.Channel.EndGetStatsEx(result);
}
private IAsyncResult OnBeginGetStatsEx(object[] inValues, AsyncCallback callback, object asyncState)
{
bool clearExceptions = (bool)inValues[0];
return BeginGetStatsEx(clearExceptions, callback, asyncState);
}
private object[] OnEndGetStatsEx(IAsyncResult result)
{
string retVal = EndGetStatsEx(result);
return new object[1] { retVal };
}
private void OnGetStatsExCompleted(object state)
{
if (this.GetStatsExCompleted != null)
{
InvokeAsyncCompletedEventArgs e = (InvokeAsyncCompletedEventArgs)state;
this.GetStatsExCompleted(this, new GetStatsExCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
}
}
public void GetStatsExAsync(bool clearExceptions)
{
GetStatsExAsync(clearExceptions, null);
}
public void GetStatsExAsync(bool clearExceptions, object userState)
{
if (onBeginGetStatsExDelegate == null)
{
onBeginGetStatsExDelegate = OnBeginGetStatsEx;
}
if (onEndGetStatsExDelegate == null)
{
onEndGetStatsExDelegate = OnEndGetStatsEx;
}
if (onGetStatsExCompletedDelegate == null)
{
onGetStatsExCompletedDelegate = OnGetStatsExCompleted;
}
InvokeAsync(onBeginGetStatsExDelegate, new object[1] { clearExceptions }, onEndGetStatsExDelegate, onGetStatsExCompletedDelegate, userState);
}
public string GetStats()
{
return base.Channel.GetStats();
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public IAsyncResult BeginGetStats(AsyncCallback callback, object asyncState)
{
return base.Channel.BeginGetStats(callback, asyncState);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public string EndGetStats(IAsyncResult result)
{
return base.Channel.EndGetStats(result);
}
private IAsyncResult OnBeginGetStats(object[] inValues, AsyncCallback callback, object asyncState)
{
return BeginGetStats(callback, asyncState);
}
private object[] OnEndGetStats(IAsyncResult result)
{
string retVal = EndGetStats(result);
return new object[1] { retVal };
}
private void OnGetStatsCompleted(object state)
{
if (this.GetStatsCompleted != null)
{
InvokeAsyncCompletedEventArgs e = (InvokeAsyncCompletedEventArgs)state;
this.GetStatsCompleted(this, new GetStatsCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
}
}
public void GetStatsAsync()
{
GetStatsAsync(null);
}
public void GetStatsAsync(object userState)
{
if (onBeginGetStatsDelegate == null)
{
onBeginGetStatsDelegate = OnBeginGetStats;
}
if (onEndGetStatsDelegate == null)
{
onEndGetStatsDelegate = OnEndGetStats;
}
if (onGetStatsCompletedDelegate == null)
{
onGetStatsCompletedDelegate = OnGetStatsCompleted;
}
InvokeAsync(onBeginGetStatsDelegate, null, onEndGetStatsDelegate, onGetStatsCompletedDelegate, userState);
}
public void SetMultiProcess(bool value)
{
base.Channel.SetMultiProcess(value);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public IAsyncResult BeginSetMultiProcess(bool value, AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetMultiProcess(value, callback, asyncState);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void EndSetMultiProcess(IAsyncResult result)
{
base.Channel.EndSetMultiProcess(result);
}
private IAsyncResult OnBeginSetMultiProcess(object[] inValues, AsyncCallback callback, object asyncState)
{
bool value = (bool)inValues[0];
return BeginSetMultiProcess(value, callback, asyncState);
}
private object[] OnEndSetMultiProcess(IAsyncResult result)
{
EndSetMultiProcess(result);
return null;
}
private void OnSetMultiProcessCompleted(object state)
{
if (this.SetMultiProcessCompleted != null)
{
InvokeAsyncCompletedEventArgs e = (InvokeAsyncCompletedEventArgs)state;
this.SetMultiProcessCompleted(this, new AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetMultiProcessAsync(bool value)
{
SetMultiProcessAsync(value, null);
}
public void SetMultiProcessAsync(bool value, object userState)
{
if (onBeginSetMultiProcessDelegate == null)
{
onBeginSetMultiProcessDelegate = OnBeginSetMultiProcess;
}
if (onEndSetMultiProcessDelegate == null)
{
onEndSetMultiProcessDelegate = OnEndSetMultiProcess;
}
if (onSetMultiProcessCompletedDelegate == null)
{
onSetMultiProcessCompletedDelegate = OnSetMultiProcessCompleted;
}
InvokeAsync(onBeginSetMultiProcessDelegate, new object[1] { value }, onEndSetMultiProcessDelegate, onSetMultiProcessCompletedDelegate, userState);
}
public void SetRecycleProcess(bool value)
{
base.Channel.SetRecycleProcess(value);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public IAsyncResult BeginSetRecycleProcess(bool value, AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetRecycleProcess(value, callback, asyncState);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void EndSetRecycleProcess(IAsyncResult result)
{
base.Channel.EndSetRecycleProcess(result);
}
private IAsyncResult OnBeginSetRecycleProcess(object[] inValues, AsyncCallback callback, object asyncState)
{
bool value = (bool)inValues[0];
return BeginSetRecycleProcess(value, callback, asyncState);
}
private object[] OnEndSetRecycleProcess(IAsyncResult result)
{
EndSetRecycleProcess(result);
return null;
}
private void OnSetRecycleProcessCompleted(object state)
{
if (this.SetRecycleProcessCompleted != null)
{
InvokeAsyncCompletedEventArgs e = (InvokeAsyncCompletedEventArgs)state;
this.SetRecycleProcessCompleted(this, new AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetRecycleProcessAsync(bool value)
{
SetRecycleProcessAsync(value, null);
}
public void SetRecycleProcessAsync(bool value, object userState)
{
if (onBeginSetRecycleProcessDelegate == null)
{
onBeginSetRecycleProcessDelegate = OnBeginSetRecycleProcess;
}
if (onEndSetRecycleProcessDelegate == null)
{
onEndSetRecycleProcessDelegate = OnEndSetRecycleProcess;
}
if (onSetRecycleProcessCompletedDelegate == null)
{
onSetRecycleProcessCompletedDelegate = OnSetRecycleProcessCompleted;
}
InvokeAsync(onBeginSetRecycleProcessDelegate, new object[1] { value }, onEndSetRecycleProcessDelegate, onSetRecycleProcessCompletedDelegate, userState);
}
public void SetThreadConfigScript(string script, bool broadcast)
{
base.Channel.SetThreadConfigScript(script, broadcast);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public IAsyncResult BeginSetThreadConfigScript(string script, bool broadcast, AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetThreadConfigScript(script, broadcast, callback, asyncState);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void EndSetThreadConfigScript(IAsyncResult result)
{
base.Channel.EndSetThreadConfigScript(result);
}
private IAsyncResult OnBeginSetThreadConfigScript(object[] inValues, AsyncCallback callback, object asyncState)
{
string script = (string)inValues[0];
bool broadcast = (bool)inValues[1];
return BeginSetThreadConfigScript(script, broadcast, callback, asyncState);
}
private object[] OnEndSetThreadConfigScript(IAsyncResult result)
{
EndSetThreadConfigScript(result);
return null;
}
private void OnSetThreadConfigScriptCompleted(object state)
{
if (this.SetThreadConfigScriptCompleted != null)
{
InvokeAsyncCompletedEventArgs e = (InvokeAsyncCompletedEventArgs)state;
this.SetThreadConfigScriptCompleted(this, new AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetThreadConfigScriptAsync(string script, bool broadcast)
{
SetThreadConfigScriptAsync(script, broadcast, null);
}
public void SetThreadConfigScriptAsync(string script, bool broadcast, object userState)
{
if (onBeginSetThreadConfigScriptDelegate == null)
{
onBeginSetThreadConfigScriptDelegate = OnBeginSetThreadConfigScript;
}
if (onEndSetThreadConfigScriptDelegate == null)
{
onEndSetThreadConfigScriptDelegate = OnEndSetThreadConfigScript;
}
if (onSetThreadConfigScriptCompletedDelegate == null)
{
onSetThreadConfigScriptCompletedDelegate = OnSetThreadConfigScriptCompleted;
}
InvokeAsync(onBeginSetThreadConfigScriptDelegate, new object[2] { script, broadcast }, onEndSetThreadConfigScriptDelegate, onSetThreadConfigScriptCompletedDelegate, userState);
}
public void SetRecycleQueueSize(int value)
{
base.Channel.SetRecycleQueueSize(value);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public IAsyncResult BeginSetRecycleQueueSize(int value, AsyncCallback callback, object asyncState)
{
return base.Channel.BeginSetRecycleQueueSize(value, callback, asyncState);
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void EndSetRecycleQueueSize(IAsyncResult result)
{
base.Channel.EndSetRecycleQueueSize(result);
}
private IAsyncResult OnBeginSetRecycleQueueSize(object[] inValues, AsyncCallback callback, object asyncState)
{
int value = (int)inValues[0];
return BeginSetRecycleQueueSize(value, callback, asyncState);
}
private object[] OnEndSetRecycleQueueSize(IAsyncResult result)
{
EndSetRecycleQueueSize(result);
return null;
}
private void OnSetRecycleQueueSizeCompleted(object state)
{
if (this.SetRecycleQueueSizeCompleted != null)
{
InvokeAsyncCompletedEventArgs e = (InvokeAsyncCompletedEventArgs)state;
this.SetRecycleQueueSizeCompleted(this, new AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
}
}
public void SetRecycleQueueSizeAsync(int value)
{
SetRecycleQueueSizeAsync(value, null);
}
public void SetRecycleQueueSizeAsync(int value, object userState)
{
if (onBeginSetRecycleQueueSizeDelegate == null)
{
onBeginSetRecycleQueueSizeDelegate = OnBeginSetRecycleQueueSize;
}
if (onEndSetRecycleQueueSizeDelegate == null)
{
onEndSetRecycleQueueSizeDelegate = OnEndSetRecycleQueueSize;
}
if (onSetRecycleQueueSizeCompletedDelegate == null)
{
onSetRecycleQueueSizeCompletedDelegate = OnSetRecycleQueueSizeCompleted;
}
InvokeAsync(onBeginSetRecycleQueueSizeDelegate, new object[1] { value }, onEndSetRecycleQueueSizeDelegate, onSetRecycleQueueSizeCompletedDelegate, userState);
}
}
@@ -0,0 +1,28 @@
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
namespace Roblox.Grid.Arbiter.Common.Arbiter;
[DebuggerStepThrough]
[GeneratedCode("System.ServiceModel", "4.0.0.0")]
public class GetStatsCompletedEventArgs : AsyncCompletedEventArgs
{
private object[] results;
public string Result
{
get
{
RaiseExceptionIfNecessary();
return (string)results[0];
}
}
public GetStatsCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState)
: base(exception, cancelled, userState)
{
this.results = results;
}
}
@@ -0,0 +1,28 @@
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
namespace Roblox.Grid.Arbiter.Common.Arbiter;
[DebuggerStepThrough]
[GeneratedCode("System.ServiceModel", "4.0.0.0")]
public class GetStatsExCompletedEventArgs : AsyncCompletedEventArgs
{
private object[] results;
public string Result
{
get
{
RaiseExceptionIfNecessary();
return (string)results[0];
}
}
public GetStatsExCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState)
: base(exception, cancelled, userState)
{
this.results = results;
}
}
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A8540F3F-9CEB-437E-AE59-EBCFE4014051}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Roblox.Grid.Arbiter.Common</RootNamespace>
<AssemblyName>Roblox.Grid.Arbiter.Common</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="ArbiterServiceUtils.cs" />
<Compile Include="ArbiterStats.cs" />
<Compile Include="ArbiterClient.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
</Project>
@@ -0,0 +1,20 @@
using Roblox.Grid.Arbiter.Common.Arbiter;
namespace Roblox.Grid.Arbiter.Common;
public class ArbiterServiceUtils
{
public static ArbiterClient GetService(string Address)
{
return GetService(Address, 64990);
}
public static ArbiterClient GetService(string Address, int port)
{
if (Address == null)
{
return null;
}
return new ArbiterClient("RccServiceMonitor", "http://" + Address + ":" + port);
}
}
@@ -0,0 +1,184 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
namespace Roblox.Grid.Arbiter.Common;
public class ArbiterStats : IEnumerable<ArbiterStats.Stat>, IEnumerable
{
public struct Stat
{
public string name;
public string value;
internal Stat(string name, string value)
{
this.name = name;
this.value = value;
}
}
private List<Stat> stats;
IEnumerator IEnumerable.GetEnumerator()
{
foreach (Stat stat in stats)
{
yield return stat;
}
}
IEnumerator<Stat> IEnumerable<Stat>.GetEnumerator()
{
foreach (Stat stat in stats)
{
yield return stat;
}
}
public ArbiterStats()
{
stats = new List<Stat>();
}
public ArbiterStats(string source)
: this()
{
XmlReader xmlReader = XmlReader.Create(new StringReader(source));
while (xmlReader.Read())
{
if (xmlReader.Name != "Stat")
{
continue;
}
Stat stat = default(Stat);
xmlReader.MoveToFirstAttribute();
do
{
if (xmlReader.Name == "Name")
{
stat.name = xmlReader.Value;
}
else if (xmlReader.Name == "Value")
{
stat.value = xmlReader.Value;
}
}
while (xmlReader.MoveToNextAttribute());
if (stat.name != null && stat.value != null)
{
stats.Add(stat);
}
}
}
public void AddStat(string name, string value)
{
stats.Add(new Stat(name, value));
}
public void AddStat(string name, int value)
{
stats.Add(new Stat(name, value.ToString()));
}
public void AddStat(string name, long value)
{
stats.Add(new Stat(name, value.ToString()));
}
public void AddStat(string name, double value)
{
stats.Add(new Stat(name, value.ToString()));
}
public void AddStat(string name, bool value)
{
stats.Add(new Stat(name, value.ToString()));
}
public string GetStat(string name)
{
foreach (Stat stat in (IEnumerable<Stat>)this)
{
if (stat.name == name)
{
return stat.value;
}
}
throw new Exception("Stat " + name + " is missing");
}
public int GetStatInt(string name)
{
string stat = GetStat(name);
if (int.TryParse(stat, out var result))
{
return result;
}
Console.WriteLine("Stat " + name + " was malformed: " + stat);
return 0;
}
public long GetStatLong(string name)
{
string stat = GetStat(name);
if (long.TryParse(stat, out var result))
{
return result;
}
Console.WriteLine("Stat " + name + " was malformed: " + stat);
return 0L;
}
public double GetStatDouble(string name)
{
string stat = GetStat(name);
if (double.TryParse(stat, out var result))
{
return result;
}
Console.WriteLine("Stat " + name + " was malformed: " + stat);
return 0.0;
}
public override string ToString()
{
StringBuilder stringBuilder = new StringBuilder();
foreach (Stat stat in (IEnumerable<Stat>)this)
{
stringBuilder.Append(stat.name + ": " + stat.value + "\r\n");
}
return stringBuilder.ToString();
}
public string ToXml()
{
StringBuilder stringBuilder = new StringBuilder();
XmlWriter xmlWriter = XmlWriter.Create(stringBuilder);
xmlWriter.WriteStartElement("Stats");
foreach (Stat stat in (IEnumerable<Stat>)this)
{
WriteStat(xmlWriter, stat);
}
xmlWriter.WriteEndElement();
xmlWriter.Close();
return stringBuilder.ToString();
}
protected static void WriteStat(XmlWriter writer, Stat stat)
{
writer.WriteStartElement("Stat");
writer.WriteStartAttribute("Name");
writer.WriteString(stat.name);
writer.WriteEndAttribute();
writer.WriteStartAttribute("Value");
writer.WriteString(stat.value);
writer.WriteEndAttribute();
writer.WriteEndElement();
}
}
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="RccServiceMonitor" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
<binding name="RccServiceMonitor1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:64990/" binding="basicHttpBinding" bindingConfiguration="RccServiceMonitor" contract="Arbiter.Arbiter" name="RccServiceMonitor"/>
<endpoint address="http://localhost:64990/" binding="basicHttpBinding" bindingConfiguration="RccServiceMonitor1" contract="Arbiter.Arbiter" name="RccServiceMonitor1"/>
</client>
</system.serviceModel>
<startup><supportedRuntime version="v2.0.50727"/></startup>
</configuration>