public void ToStream(IO.IndentedTextWriter s) { s.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}", UsesRemaining.ToString(), TimesUsed.ToString(), ChargeCap.ToString(), NextGrantTime.ToString(), InfiniteUses.ToString(), Recharging.ToString(), SquadID.ToString("X8")); }
public System.String ToJSON() { return("{" + "\"seq\": " + seq.ToString() + ", " + "\"stamp\": " + stamp.ToString() + ", " + "\"frame_id\": \"" + frame_id + "\"}"); }
public void StoreTileImage(System.Int32 Zoom, System.Int32 X, System.Int32 Y, System.Drawing.Image Image, System.DateTime ExpireDateTime) { if (_RootDirectory != null) { var Path = _RootDirectory; if (System.IO.Directory.Exists(Path) == false) { System.IO.Directory.CreateDirectory(Path); } Path = System.IO.Path.Combine(Path, Zoom.ToString(System.Globalization.CultureInfo.InvariantCulture)); if (System.IO.Directory.Exists(Path) == false) { System.IO.Directory.CreateDirectory(Path); } Path = System.IO.Path.Combine(Path, X.ToString(System.Globalization.CultureInfo.InvariantCulture)); if (System.IO.Directory.Exists(Path) == false) { System.IO.Directory.CreateDirectory(Path); } var Entry = Y.ToString(System.Globalization.CultureInfo.InvariantCulture) + ".png"; Image.Save(System.IO.Path.Combine(Path, Entry), System.Drawing.Imaging.ImageFormat.Png); SaveExpireDateTime(Path, Entry, ExpireDateTime); } }
public System.Drawing.Image LoadTileImage(System.Int32 Zoom, System.Int32 X, System.Int32 Y) { System.Drawing.Image Result = null; if (_RootDirectory != null) { var Path = _RootDirectory; if (System.IO.Directory.Exists(Path) == true) { Path = System.IO.Path.Combine(Path, Zoom.ToString(System.Globalization.CultureInfo.InvariantCulture)); if (System.IO.Directory.Exists(Path) == true) { Path = System.IO.Path.Combine(Path, X.ToString(System.Globalization.CultureInfo.InvariantCulture)); if (System.IO.Directory.Exists(Path) == true) { var Entry = Y.ToString(System.Globalization.CultureInfo.InvariantCulture) + ".png"; if (IsExpired(Path, Entry) == false) { Path = System.IO.Path.Combine(Path, Entry); if (System.IO.File.Exists(Path) == true) { Result = new System.Drawing.Bitmap(Path); } } } } } } return(Result); }
IObservable <LightNode.Performance.MyClass> _IPerf.Echo(System.String name, System.Int32 x, System.Int32 y, LightNode.Performance.MyEnum e, IProgress <float> reportProgress) { var list = new List <KeyValuePair <string, string[]> >(); var form = new WWWForm(); if (name != null) { form.AddField("name", name); list.Add(new KeyValuePair <string, string[]>("name", new[] { name })); } form.AddField("x", x.ToString()); list.Add(new KeyValuePair <string, string[]>("x", new[] { x.ToString() })); form.AddField("y", y.ToString()); list.Add(new KeyValuePair <string, string[]>("y", new[] { y.ToString() })); form.AddField("e", ((System.Int32)e).ToString()); list.Add(new KeyValuePair <string, string[]>("e", new[] { ((System.Int32)e).ToString() })); return(_PostAsync <LightNode.Performance.MyClass>("Perf", "Echo", form, list, reportProgress)); }
/** Convert */ public static void Convert(System.Int32 a_in_value, System.Text.StringBuilder a_out_stringbuilder, ConvertToJsonStringOption a_option) { string t_string = a_in_value.ToString(Config.CULTURE); a_out_stringbuilder.Append(t_string); if ((a_option & ConvertToJsonStringOption.NoSignedNumberSuffix) == 0) { a_out_stringbuilder.Append("l"); } return; }
IObservable <LightNode.Performance.MyClass> _IPerf.Echo(System.String name, System.Int32 x, System.Int32 y, LightNode.Performance.MyEnum e, IProgress <float> reportProgress) { var form = new WWWForm(); if (name != null) { form.AddField("name", name); } form.AddField("x", x.ToString()); form.AddField("y", y.ToString()); form.AddField("e", ((System.Int32)e).ToString()); return(_PostAsync <LightNode.Performance.MyClass>("Perf", "Echo", form, reportProgress)); }
/** Convert */ public static void Convert(System.Int32 a_in_value, System.Text.StringBuilder a_out_stringbuilder, ConvertToJsonStringOption a_option) { try{ string t_string = a_in_value.ToString(Config.CULTURE); a_out_stringbuilder.Append(t_string); if ((a_option & ConvertToJsonStringOption.NoSignedNumberSuffix) == 0) { a_out_stringbuilder.Append("l"); } return; }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } //不明。 Tool.Assert(false); return; }
public string CreateJwtToken(GameId gameId, PlayerId playerId) { var tokenSecret = _configuration.GetValue <string>("TokenSecret"); var securityKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(tokenSecret)); var tokenHandler = new JwtSecurityTokenHandler(); var tokenDescriptor = new SecurityTokenDescriptor { Subject = new ClaimsIdentity(new[] { new Claim("gameId", gameId.ToString()), new Claim("playerId", playerId.ToString()), }), SigningCredentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256Signature), }; var token = tokenHandler.CreateToken(tokenDescriptor); return(tokenHandler.WriteToken(token)); }
public System.String ToJSON() { return("{\"data\" : " + data.ToString() + "}"); }
/// <summary> /// Deletes a existing resource. /// </summary> /// <param name="ID">The ID of the resource to be deleted.</param> public void Delete(System.Int32 ID) => this.Delete(ID.ToString());
/// <summary> /// Deletes a existing resource. /// </summary> /// <param name="ID">The ID of the resource to be deleted.</param> public async System.Threading.Tasks.Task DeleteAsync(System.Int32 ID) => await this.DeleteAsync(ID.ToString());
/// <summary> /// Gets a single resource by ID. /// </summary> /// <param name="ID">The ID of the resource to show.</param> /// <returns>A resource represented by ID.</returns> public T Show(System.Int32 ID) => this.Show(ID.ToString());
/// <summary> /// Updates a resource partially. /// </summary> /// <param name="ID">The ID of the resource to be modified.</param> /// <param name="Model">The object that contains the fields and values to be modified.</param> /// <returns>The modified resource.</returns> public T Modify(System.Int32 ID, System.Object Model) => this.Modify(ID.ToString(), Model);
/// <summary> /// Converts the numeric value of this instance to its equivalent string representation. /// </summary> /// <returns>The string representation of the value of this instance, consisting of a negative sign if the value is negative, and a sequence of digits ranging from 0 to 9 with no leading zeroes.</returns> public override string ToString() => _value.ToString();
public void SetAge(System.Int32 _p0) { LOGGER.Info("TestContractSimpleServiceImpl.SetAge, " + _p0.ToString()); this.mAge = _p0; }