public static void ConnectClients() { PrettyPrint.Log("Connecting clients..."); foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) { var references = assembly.GetReferencedAssemblies().ToList(); foreach (var reference in references) { if (reference.Name.Contains("TCR-TerrariaChatRelay")) { foreach (var type in assembly.GetTypes()) { if (type.BaseType == typeof(TCRPlugin)) { Activator.CreateInstance(type); break; } } ((CommandService)CommandServ).ScanForCommands(assembly); break; } } } for (var i = 0; i < Subscribers.Count; i++) { PrettyPrint.Log(Subscribers[i].GetType().ToString() + " Connecting..."); Subscribers[i].Connect(); } Console.ResetColor(); }
public static void Test() { Console.WriteLine("Testing Pyro echo server (make sure it's running, with nameserver enabled)..."); Console.WriteLine("Pyrolite version: " + Config.PYROLITE_VERSION); setConfig(); Console.WriteLine("serializer used: {0}", Config.SERIALIZER); if (Config.SERIALIZER == Config.SerializerType.serpent) { Console.WriteLine("note that for the serpent serializer, you need to have the Razorvine.Serpent assembly available."); } NameServerProxy ns = NameServerProxy.locateNS(null); PyroProxy p = new PyroProxy(ns.lookup("test.echoserver")); // PyroProxy p=new PyroProxy("localhost",9999,"test.echoserver"); Object x = 42; Console.WriteLine("echo param:"); PrettyPrint.print(x); Object result = p.call("echo", x); Console.WriteLine("return value:"); PrettyPrint.print(result); String s = "This string is way too long. This string is way too long. This string is way too long. This string is way too long. "; s = s + s + s + s + s; Console.WriteLine("echo param:"); PrettyPrint.print(s); result = p.call("echo", s); Console.WriteLine("return value:"); PrettyPrint.print(result); Console.WriteLine("dict test."); IDictionary <string, object> map = new Dictionary <string, object>() { { "value", 42 }, { "message", "hello" }, { "timestamp", DateTime.Now } }; result = p.call("echo", map); Console.WriteLine("return value:"); PrettyPrint.print(result); Console.WriteLine("error test."); try { result = p.call("error"); } catch (PyroException e) { Console.WriteLine("Pyro Exception (expected)! {0}", e.Message); Console.WriteLine("Pyro Exception cause: {0}", e.InnerException); Console.WriteLine("Pyro Exception remote traceback:\n>>>\n{0}<<<", e._pyroTraceback); } Console.WriteLine("shutting down the test echo server."); p.call("shutdown"); }
public int Eval(string args) { string relativePath; args = Util.NextToken(args, out relativePath); ReadableDargonNode nextNode; if (!DumperUtils.TryResolvePath(relativePath, out nextNode)) { DumperUtils.PrintUnableToResolvePath(relativePath); return(1); } else { Console.WriteLine("Listing directory " + DumperGlobals.CurrentNode.GetPath()); PrettyPrint.List( nextNode.Children.OrderBy(x => x.Name), new PrettyFormatter <ReadableDargonNode> { GetName = (n) => n.Name, GetBackground = (n) => n.Children.Any() ? ConsoleColor.DarkRed : ConsoleHelpers.DefaultBackgroundColor, GetForeground = (n) => n.Children.Any() ? ConsoleColor.White : ConsoleHelpers.DefaultForegroundColor, }); return(0); } }
public async Task AdminInfo(string botName, [Remainder] string selectedInfo) { botName = botName.ToLower(); selectedInfo = selectedInfo.ToLower(); if (botName != Assembly.GetEntryAssembly().GetName().Name.ToLower()) { return; } string prefix = $"**{Configurations.CommandPrefix}admininfo {Assembly.GetEntryAssembly().GetName().Name.ToLower()} "; string suffix = $"**"; try { string output = _info.GetInfo(selectedInfo).Content; await Context.Channel.SendMessageAsync( _info.GetInfo(selectedInfo).Content ?? "Nothing to display."); PrettyPrint.WriteLine($"Listing Info: {selectedInfo}"); } catch (KeyNotFoundException e) { PrettyPrint.WriteLine(e.Message); await Context.Channel.SendMessageAsync("Invalid selection."); } }
public void testMemoing() { ArrayList list = new ArrayList(); list.Add("irmen"); list.Add("irmen"); list.Add("irmen"); Assert.AreEqual(list, U("]q\u0000(U\u0005irmenq\u0001h\u0001h\u0001e.")); ArrayList a = new ArrayList(); a.Add(111); ArrayList b = new ArrayList(); b.Add(222); ArrayList c = new ArrayList(); c.Add(333); object[] array = new object[] { a, b, c, a, b, c }; Assert.AreEqual(array, (object[])U("((lp0\nI111\na(lp1\nI222\na(lp2\nI333\nag0\ng1\ng2\ntp3\n.")); list.Clear(); list.Add("a"); list.Add("b"); list.Add(list); //recursive a = (ArrayList)U("(lp0\nS'a'\np1\naS'b'\np2\nag0\na."); Assert.AreEqual("[a, b, (this Collection), ]", PrettyPrint.printToString(a)); a = (ArrayList)U("\u0080\u0002]q\u0000(U\u0001aq\u0001U\u0001bq\u0002h\u0000e."); Assert.AreEqual("[a, b, (this Collection), ]", PrettyPrint.printToString(a)); a = (ArrayList)U("]q\u0000(]q\u0001(K\u0001K\u0002K\u0003e]q\u0002(h\u0001h\u0001ee."); Assert.AreEqual("[[1, 2, 3, ], [[1, 2, 3, ], [1, 2, 3, ], ], ]", PrettyPrint.printToString(a)); }
/// <summary> /// Swaps values like references over to reference tokens to prevent issues. /// </summary> protected object?MakeValueNetSafe(object?value) { if (value == null) { return(null); } var valType = value.GetType(); if (!valType.IsValueType) { // TODO: More flexibility in which types can be sent here. if (valType != typeof(string)) { return(new ViewVariablesBlobMembers.ReferenceToken { Stringified = PrettyPrint.PrintUserFacing(value) }); } } else if (!Session.RobustSerializer.CanSerialize(valType)) { // Can't send this value type over the wire. return(new ViewVariablesBlobMembers.ServerValueTypeToken { Stringified = value.ToString() }); } return(value); }
public async void Display(IUser user) { if (!_initialized) { Init(); _initialized = true; } OnDisplay(user); if (!_displayEnabled) { return; } string response = ""; if (oneTimeMessage != null) { if (_prependQueuedMessage) { response += $"{oneTimeMessage}\n\n"; oneTimeMessage = null; } } response += GetHeader(); response += GetTitle(); response += GetMenuList(); response += GetFooter(); if (oneTimeMessage != null) { if (!_prependQueuedMessage) { response += $"\n\n{oneTimeMessage}"; oneTimeMessage = null; } } try { if (_stream != null) { await user.GetOrCreateDMChannelAsync().Result.SendFileAsync(_stream, "image.png", response); _stream.Dispose(); _stream = null; } else { Embed embed = _embed != null?_embed.Build() : null; await user.SendMessageAsync(response, false, embed); } } catch (Exception e) //ArgumentException { PrettyPrint.WriteLine(e.ToString()); } }
private void ShowVars() { if (fields == null) { fields = EvaluatorProxy.fields; } scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, false, false); EditorGUI.indentLevel++; GUILayout.BeginHorizontal(); GUILayout.Space(EditorGUI.indentLevel * 14); GUILayout.BeginVertical(); // TODO: This is gonna be WAY inefficient *AND* ugly. Need a better // TODO: way to handle tabular data, and need a way to track what // TODO: has/hasn't changed here. StringBuilder tmp = new StringBuilder(); foreach (DictionaryEntry kvp in fields) { FieldInfo field = (FieldInfo)kvp.Value; GUILayout.BeginHorizontal(); GUILayout.Label(TypeManagerProxy.CSharpName(field.FieldType)); GUILayout.Space(10); GUILayout.Label((string)kvp.Key); GUILayout.FlexibleSpace(); PrettyPrint.PP(tmp, field.GetValue(null)); GUILayout.Label(tmp.ToString()); tmp.Length = 0; GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); EditorGUI.indentLevel--; EditorGUILayout.EndScrollView(); }
private void DiffTest(string expected, string encountered = null, string message = null) { if (OperatingSystemHelper.IsUnixOS) { expected = expected.Replace("\r", ""); encountered = encountered.Replace("\r", ""); message = message.Replace("\r", ""); } encountered = encountered ?? expected; var logger = Logger.CreateLogger(preserveLogEvents: true); var loggingContext = new LoggingContext("UnitTest"); PrettyPrint.ReportFirstDifference(logger, loggingContext, encountered, expected, @"b:\f\a.txt"); if (message == null) { Assert.False(logger.HasErrors, "Did not expect to encounter errors"); } else { Assert.True(logger.HasErrors, "Expected to encounter an error"); Assert.Equal(1, logger.ErrorCount); var diagnostic = logger.CapturedDiagnostics[0]; var msg = OperatingSystemHelper.IsUnixOS ? diagnostic.Message.Replace("\r", "") : diagnostic.Message; Assert.Equal(message, msg); } }
protected override Control MakeUI(object?value) { if (value == null) { return(new Label { Text = "null", Align = Label.AlignMode.Right }); } _localValue = value; // NOTE: value is NOT always the actual object. // Only thing we can really rely on is that ToString works out correctly. // This is because of reference tokens, but due to simplicity the object ref is still passed. var toString = PrettyPrint.PrintUserFacing(value); var button = new Button { Text = $"Ref: {toString}", ClipText = true, HorizontalExpand = true, }; button.OnPressed += ButtonOnOnPressed; return(button); }
private RestRequest CreateRequest(string function) { RestRequest request; if (LargeQuery.HasValue && LargeQuery.Value) { request = new RestRequest(function, Method.POST); //To use POST, you must use the X-HTTP-Method-Override header to tell the Translate API to treat the request as a GET (use X-HTTP-Method-Override: GET). request.AddHeader("X-HTTP-Method-Override", "GET"); } else { request = new RestRequest(function, Method.GET); } request.AddParameter("key", _key); if (PrettyPrint.HasValue) { request.AddParameter("prettyprint", PrettyPrint.ToString().ToLower()); } return(request); }
public async Task MessageReceivedAsync(SocketMessage rawMessage) { // Ignore system messages, or messages from other bots if (!(rawMessage is SocketUserMessage message)) { return; } if (message.Source != MessageSource.User) { return; } // This value holds the offset where the prefix ends var argPos = 0; if (!message.HasCharPrefix(Configurations.CommandPrefix, ref argPos)) { return; } var context = new CommandContext(_discord, message); var result = await _commands.ExecuteAsync(context, argPos, _services); if (result.Error.HasValue && result.Error.Value != CommandError.UnknownCommand) // it's bad practice to send 'unknown command' errors { if (result.Error.Value != CommandError.UnmetPrecondition) { await context.Channel.SendMessageAsync(result.ErrorReason); } PrettyPrint.WriteLine(result.ToString()); } }
public void Show() { PrettyPrint p = new PrettyPrint(); ConsoleEx.WriteLine("\n{0}AST:", ConsoleColor.White); ast.Accept(p); Console.WriteLine("\n"); }
public void LoadConfigs() { foreach (StoredConfig data in configs) { data.Config.GetOrCreateConfiguration(); PrettyPrint.Log(LogSeverity.Info, "ConfigurationService", $"{data.Namespace} {data.Name} - Config loaded."); } }
/// <summary> /// Swaps values like references over to reference tokens to prevent issues. /// </summary> protected object?MakeValueNetSafe(object?value) { if (value == null) { return(null); } var valType = value.GetType(); if (!valType.IsValueType) { // TODO: More flexibility in which types can be sent here. // We don't blindly send any prototypes, we ONLY send prototypes for valid, registered variants. if (typeof(IPrototype).IsAssignableFrom(valType) && IoCManager.Resolve <IPrototypeManager>().TryGetVariantFrom(valType, out var variant)) { return(new ViewVariablesBlobMembers.PrototypeReferenceToken() { Stringified = PrettyPrint.PrintUserFacing(value), ID = ((IPrototype)value).ID, Variant = variant }); } if (valType != typeof(string)) { return(new ViewVariablesBlobMembers.ReferenceToken { Stringified = PrettyPrint.PrintUserFacing(value) }); } } else if (!Session.RobustSerializer.CanSerialize(valType)) { // Handle KeyValuePair<,> if (valType.IsGenericType && valType.GetGenericTypeDefinition() == typeof(KeyValuePair <,>)) { dynamic kv = value; var key = kv.Key; var val = kv.Value; return(new ViewVariablesBlobMembers.ServerKeyValuePairToken { Key = MakeValueNetSafe(key), Value = MakeValueNetSafe(val) }); } // Can't send this value type over the wire. return(new ViewVariablesBlobMembers.ServerValueTypeToken { Stringified = value.ToString() }); } return(value); }
/// <summary> /// Create a new WebSocket and initiate connection with Discord servers. /// Utilizes BOT_TOKEN and CHANNEL_ID found in Mod Config. /// </summary> public override void Connect() { if (BOT_TOKEN == "BOT_TOKEN" || Channel_IDs.Contains(0)) { PrettyPrint.Log("Discord", "Please update your Mod Config. Mod reload required."); if (BOT_TOKEN == "BOT_TOKEN") { PrettyPrint.Log("Discord", " Invalid Token: BOT_TOKEN", ConsoleColor.Yellow); } if (Channel_IDs.Contains(0)) { PrettyPrint.Log("Discord", " Invalid Channel Id: 0", ConsoleColor.Yellow); } PrettyPrint.Log("Discord", "Config path: " + new Configuration().FileName); Console.ResetColor(); Dispose(); return; } if (Main.Config.OwnerUserId == 0) { PrettyPrint.Log("Discord", " Invalid Owner Id: 0", ConsoleColor.Yellow); } errorCounter = 0; Socket = new WebSocket(GATEWAY_URL); Socket.Compression = CompressionMethod.Deflate; Socket.OnOpen += (object sender, EventArgs e) => { PrettyPrint.Log("Discord", "Connection established. Logging in!"); Socket.Send(DiscordMessageFactory.CreateLogin(BOT_TOKEN)); }; Socket.OnMessage += Socket_OnDataReceived; Socket.OnMessage += Socket_OnHeartbeatReceived; Socket.OnError += Socket_OnError; if (!debug) { Socket.Log.Output = (_, __) => { } } ; Socket.Connect(); if (Main.Config.ShowPoweredByMessageOnStartup) { messageQueue.QueueMessage(Channel_IDs, $"**This bot is powered by TerrariaChatRelay**\nUse **{Main.Config.CommandPrefix}help** for more commands!"); Main.Config.ShowPoweredByMessageOnStartup = true; Main.Config.SaveJson(); } }
public static void ConnectClients() { PrettyPrint.Log("Connecting clients..."); for (var i = 0; i < Subscribers.Count; i++) { PrettyPrint.Log(Subscribers[i].GetType().ToString() + " Connecting..."); Subscribers[i].Connect(); } Console.ResetColor(); }
private void OnServerLeave(LeaveEventArgs args) { try { EventManager.RaiseTerrariaMessageReceived(this, -1, $"{Main.player[args.Who].name} has left."); } catch (Exception) { PrettyPrint.Log("OnServerLeave could not be broadcasted."); } }
/// <summary> /// Attempts to reconnect after receiving an error. /// </summary> private void Socket_OnError(object sender, WebSocketSharp.ErrorEventArgs e) { Disconnect(); var restartClient = new ChatClient(parent, BOT_TOKEN, Channel_IDs.ToArray()); PrettyPrint.Log("Discord", "Client disconnected. Attempting to reconnect..."); restartClient.Connect(); parent.Add(restartClient); Dispose(); }
public bool Eval(string code) { EditorApplication.LockReloadAssemblies(); bool status = false, hasOutput = false; object output = null; string res = null, tmpCode = code.Trim(); // Debug.Log("Evaluating: " + tmpCode); try { if (tmpCode.StartsWith("=")) { // Special case handling of calculator mode. The problem is that // expressions involving multiplication are grammatically ambiguous // without a var declaration or some other grammatical construct. // TODO: Change the prompt in calculator mode. Needs to be done from Shell. tmpCode = "(" + tmpCode.Substring(1, tmpCode.Length - 1) + ");"; } res = Evaluate(tmpCode, out output, out hasOutput); } catch (EvaluationException) { Debug.LogError(@"Error compiling/executing code. Please double-check syntax, method/variable names, etc. You can find more information in Unity's `Editor.log` file (*not* the editor console!)."); output = new Evaluator.NoValueSet(); hasOutput = false; res = tmpCode; // Enable continued editing on syntax errors, etc. } catch (Exception e) { Debug.LogError(e); res = tmpCode; // Enable continued editing on unexpected errors. } finally { status = res == null; } if (hasOutput) { if (status) { try { StringBuilder sb = new StringBuilder(); PrettyPrint.PP(sb, output, true); Debug.Log(sb.ToString()); } catch (Exception e) { Debug.LogError(e.ToString().Trim()); } } } EditorApplication.UnlockReloadAssemblies(); return(status); }
/// <summary> /// Attempts to reconnect after receiving an error. /// </summary> private void Socket_OnError(object sender, WebSocketSharp.ErrorEventArgs e) { PrettyPrint.Log("Discord", e.Message, ConsoleColor.Red); Disconnect(); var restartClient = new ChatClient(parent, BOT_TOKEN, Channel_IDs.ToArray()); PrettyPrint.Log("Discord", "Restarting client...", ConsoleColor.Yellow); restartClient.Connect(); parent.Add(restartClient); Dispose(); }
protected Result <TextEdit[], ResponseError> AddSourceFileToProject(JToken token) { if (m_addSourceFileConfiguration == null || m_addSourceFileConfiguration.Configurations.Length == 0) { return(Result <TextEdit[], ResponseError> .Error(new ResponseError { code = ErrorCodes.InvalidRequest, message = BuildXL.Ide.LanguageServer.Strings.AddSourceFileConfigurationNotReceived, })); } var appState = m_getAppState(); if (appState == null) { return(Result <TextEdit[], ResponseError> .Error(new ResponseError { code = ErrorCodes.InternalError, message = BuildXL.Ide.LanguageServer.Strings.WorkspaceParsingFailedCannotPerformAction, })); } var addSourceFileParams = token.ToObject <AddSourceFileToProjectParams>(); var workspace = appState.IncrementalWorkspaceProvider.WaitForRecomputationToFinish(); var uri = new Uri(addSourceFileParams.ProjectSpecFileName); if (uri.TryGetSourceFile(workspace, appState.PathTable, out var projectSourceFile)) { var checker = workspace.GetSemanticModel().TypeChecker; if (TryAddSourceFileToSourceFile( checker, projectSourceFile, addSourceFileParams.RelativeSourceFilePath, workspace, appState.PathTable, m_addSourceFileConfiguration.Configurations)) { var formattedText = PrettyPrint.GetFormattedText(projectSourceFile); var textEdit = new TextEdit { NewText = formattedText, Range = projectSourceFile.ToRange(), }; return(Result <TextEdit[], ResponseError> .Success(new[] { textEdit })); } } return(Result <TextEdit[], ResponseError> .Success(null)); }
public MenuService( DiscordSocketClient discord, IServiceProvider services) { _discord = discord; _services = services; _users = new Dictionary <ulong, MenuUser>(); _discord.MessageReceived += MessageReceivedAsync; PrettyPrint.WriteLine("Menu Service successfully loaded."); }
public async Task MessageReceivedAsync(SocketMessage rawMsg) { // Ignore system messages, or messages from other bots if (!(rawMsg is SocketUserMessage msg)) { return; } if (msg.Source != MessageSource.User) { return; } PrettyPrint.Log((SocketUserMessage)rawMsg); }
/// <summary> /// Create a new WebSocket and initiate connection with Discord servers. /// Utilizes BOT_TOKEN and CHANNEL_ID found in Mod Config. /// </summary> public override void Connect() { if (BOT_TOKEN == "BOT_TOKEN" || Channel_IDs.Contains(0)) { PrettyPrint.Log("Discord", "Please update your Mod Config. Mod reload required."); if (BOT_TOKEN == "BOT_TOKEN") { Console.WriteLine(" Invalid Token: BOT_TOKEN"); } if (Channel_IDs.Contains(0)) { Console.WriteLine(" Invalid Channel Id: 0"); } Console.WriteLine(" Config path: " + new Configuration().FileName); Console.ResetColor(); Dispose(); return; } errorCounter = 0; Socket = new WebSocket(GATEWAY_URL); Socket.Compression = CompressionMethod.Deflate; Socket.OnOpen += (object sender, EventArgs e) => { PrettyPrint.Log("Discord", "Connection complete!"); Socket.Send(DiscordMessageFactory.CreateLogin(BOT_TOKEN)); }; Socket.OnMessage += Socket_OnDataReceived; Socket.OnMessage += Socket_OnHeartbeatReceived; Socket.OnError += Socket_OnError; if (!debug) { Socket.Log.Output = (_, __) => { } } ; Socket.Connect(); if (!Main.Config.FirstTimeMessageShown || Main.Config.AlwaysShowFirstTimeMessage) { messageQueue.QueueMessage(Channel_IDs, $"**This bot is powered by TerrariaChatRelay**\nUse {Main.Config.CommandPrefix}info for more commands!"); Main.Config.FirstTimeMessageShown = true; Main.Config.SaveJson(); } }
public void SetText(string fragment) { fragment = fragment.Trim(); if (fragment.StartsWith("<")) //performance optimization, gridview will take long time if it is no xml document { if (XSConfiguration.Instance.Config.AlwaysPrettyprintFragments) { try { _edtFragment.Text = PrettyPrint.Execute(fragment, true, false, true); } catch { _edtFragment.Text = fragment; // MessageBox.Show(Application.Current.MainWindow, "Cannot prettyprint selected text:\n" + e.Message, // "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } else { _edtFragment.Text = fragment; } try { GridBuilder builder = new GridBuilder(); GridCellGroup root = new GridCellGroup(); //XmlDocument xmldoc = fragment.ToXmlDocument(); XmlDocument xmldoc = new XmlDocument(); //do this to remove #whitespace nodes xmldoc.LoadXml(fragment.ToXmlDocument().OuterXml); builder.ParseNodes(root, null, xmldoc.ChildNodes); _gridFragment.Cell = root; _gridFragment.FullExpand(); } catch (Exception) { _gridFragment.Cell = null; } } else { _edtFragment.Text = fragment; _gridFragment.Cell = null; } updateFolding(); }
public override void Initialize(SS14Window window, object obj) { Object = obj; var type = obj.GetType(); var title = PrettyPrint.PrintUserFacingWithType(obj, out var subtitle); _wrappingInit(window, title, subtitle); foreach (var trait in TraitsFor(ViewVariablesManager.TraitIdsFor(type))) { trait.Initialize(this); _traits.Add(trait); } _refresh(); }
private void mnuAppendToEditorAndPrettyprint_Click(object sender, RoutedEventArgs e) { string text = getStringInContext().Trim(WhitespaceChars); try { text = PrettyPrint.Execute(text, true, false, true); } catch { // text = getStringInContext(); } _editor.XmlEditor.AppendText(text); }
public async Task AdminInfo(string botName) { botName = botName.ToLower(); if (botName != Assembly.GetEntryAssembly().GetName().Name.ToLower()) { return; } string prefix = $"**{Configurations.CommandPrefix}admininfo {Assembly.GetEntryAssembly().GetName().Name.ToLower()} "; string suffix = $"**"; await Context.Channel.SendMessageAsync( _info.GetList(prefix, suffix)); PrettyPrint.WriteLine($"Listing admin info."); }
/// <summary> /// Swaps values like references over to reference tokens to prevent issues. /// </summary> protected object?MakeValueNetSafe(object?value) { if (value == null) { return(null); } var valType = value.GetType(); if (!valType.IsValueType) { // TODO: More flexibility in which types can be sent here. if (valType != typeof(string)) { return(new ViewVariablesBlobMembers.ReferenceToken { Stringified = PrettyPrint.PrintUserFacing(value) }); } } else if (!Session.RobustSerializer.CanSerialize(valType)) { // Handle KeyValuePair<,> if (valType.IsGenericType && valType.GetGenericTypeDefinition() == typeof(KeyValuePair <,>)) { dynamic kv = value; var key = kv.Key; var val = kv.Value; return(new ViewVariablesBlobMembers.ServerKeyValuePairToken { Key = MakeValueNetSafe(key), Value = MakeValueNetSafe(val) }); } // Can't send this value type over the wire. return(new ViewVariablesBlobMembers.ServerValueTypeToken { Stringified = value.ToString() }); } return(value); }