public override void OnEnable() { I18n.Instance.ApplyLanguage(new Language()); srcBili = new BiliBili(); srcTwitch = new Twitch(); base.EventBus.BindEvent <InitCommandEvent>(evt => new BaseCommand(evt.Commands)); base.EventBus.BindEvent <InitSourceEvent>(evt => { evt.Sources.AddSource(srcBili); evt.Sources.AddSource(srcTwitch); }); fltFormat = new DefaultFormat(); fltGift = new GiftReceivePeeker(); fltOnline = new OnlineChangePeeker(); fltDeadunlock = new MessageDeadLoopLimiter(); base.EventBus.BindEvent <InitFilterEvent>(evt => evt.Filters.AddFilters(fltFormat, fltGift, fltOnline, fltDeadunlock)); base.EventBus.BindEvent <LoadCompleteEvent>(DefaultPlugin_onLoadComplete); clientOSU = new DirectOSUIRCBot(); base.EventBus.BindEvent <InitClientEvent>(evt => { evt.Clients.AddAllClient(clientOSU); #if (DEBUG) evt.Clients.AddClient(new ConsoleReciveSendOnlyClient()); #endif }); IO.CurrentIO.WriteColor("Default Plugin by Deliay", ConsoleColor.DarkCyan); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setUp() public virtual void SetUp() { JsonFormat inner = new JsonFormat(); List <MediaType> supported = new List <MediaType>(); MediaType requested = MediaType.APPLICATION_JSON_TYPE; _input = new DefaultFormat(inner, supported, requested); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public java.util.Map<String, Object> readMap(final String input, String... requiredKeys) throws org.neo4j.server.rest.repr.BadInputException //JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected: public override IDictionary <string, object> ReadMap(string input, params string[] requiredKeys) { Dictionary <string, object> result = new Dictionary <string, object>(); if (input.Length == 0) { return(result); } foreach (string pair in input.Split("&", true)) { string[] fields = pair.Split("=", true); string key; string value; try { string charset = StandardCharsets.UTF_8.name(); key = EnsureThatKeyDoesNotHavePhPStyleParenthesesAtTheEnd(URLDecoder.decode(fields[0], charset)); value = URLDecoder.decode(fields[1], charset); } catch (UnsupportedEncodingException e) { throw new BadInputException(e); } object old = result[key]; if (old == null) { result[key] = value; } else { IList <object> list; //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: if (old instanceof java.util.List<?>) if (old is IList <object> ) { list = (IList <object>)old; } else { list = new List <object>(); result[key] = list; list.Add(old); } list.Add(value); } } return(DefaultFormat.validateKeys(result, requiredKeys)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public java.util.Map<String, Object> readMap(String input, String... requiredKeys) throws org.neo4j.server.rest.repr.BadInputException public override IDictionary <string, object> ReadMap(string input, params string[] requiredKeys) { if (Empty(input)) { return(DefaultFormat.validateKeys(Collections.emptyMap(), requiredKeys)); } try { return(DefaultFormat.validateKeys(JsonHelper.jsonToMap(StripByteOrderMark(input)), requiredKeys)); } catch (Exception ex) { throw new BadInputException(ex); } }
/// <summary> /// Builds var formatter /// </summary> /// <param name="format"></param> /// <param name="parameters"></param> /// <returns></returns> public static IVarFormatter Build( DefaultFormat format, string parameters ){ switch( format ){ case DefaultFormat.Text: return new TextVarFormatter(parameters); case DefaultFormat.Boolean: return new BooleanVarFormatter(parameters); case DefaultFormat.Custom: return new CustomVarFormatter( parameters ); case DefaultFormat.DateTime: return new DateTimeVarFormatter(parameters); case DefaultFormat.Number: return new NumberVarFormatter(parameters); default: return new TextVarFormatter(parameters); } }
/// <summary> /// Builds var formatter /// </summary> /// <param name="format"></param> /// <param name="parameters"></param> /// <returns></returns> public static IVarFormatter Build(DefaultFormat format, string parameters) { switch (format) { case DefaultFormat.Text: return(new TextVarFormatter(parameters)); case DefaultFormat.Boolean: return(new BooleanVarFormatter(parameters)); case DefaultFormat.Custom: return(new CustomVarFormatter(parameters)); case DefaultFormat.DateTime: return(new DateTimeVarFormatter(parameters)); case DefaultFormat.Number: return(new NumberVarFormatter(parameters)); default: return(new TextVarFormatter(parameters)); } }
/// <summary> /// Builds var formatter /// </summary> /// <param name="format"></param> /// <returns></returns> public static IVarFormatter Build( DefaultFormat format ){ return Build( format, null); }
public virtual GraphicsFormat GetGraphicsFormat(DefaultFormat format) { return(EditorSystemInfo.GetGraphicsFormat(format)); }
/// <summary> /// Constructor /// </summary> /// <param name="format"></param> /// <param name="aditionalParameters"></param> protected BasicVarFormatter( DefaultFormat format, string aditionalParameters) { _format = format; this._formatterParameters = aditionalParameters; }
public Texture2DArray(int width, int height, int depth, DefaultFormat format, TextureCreationFlags flags) : this(width, height, depth, SystemInfo.GetGraphicsFormat(format), flags) { }
extern public static GraphicsFormat GetGraphicsFormat(DefaultFormat format);
[FreeFunction] // 0x0000000180104A80-0x0000000180104AB0 public static GraphicsFormat GetGraphicsFormat(DefaultFormat format) => default; // 0x00000001808DF280-0x00000001808DF2C0
/// <summary> /// Create custom formatable var. /// </summary> /// <param name="name"></param> /// <param name="format"></param> /// <param name="formatParameters"></param> public FormatableVariable(string name, DefaultFormat format, string formatParameters) : base(name) { _formatter = GetFormatter(format, formatParameters); }
public CustomRenderTexture(int width, int height, DefaultFormat defaultFormat) : this(width, height, SystemInfo.GetGraphicsFormat(defaultFormat)) { }
/// <summary> /// Create custom formatable var. /// </summary> /// <param name="name"></param> /// <param name="format"></param> /// <param name="formatParameters"></param> public FormatableVariable( string name, DefaultFormat format, string formatParameters):base( name ) { _formatter = GetFormatter( format, formatParameters ); }
/// <summary> /// Get formatter by enum. /// </summary> /// <param name="format"></param> /// <param name="parameters"></param> /// <returns></returns> protected IVarFormatter GetFormatter(DefaultFormat format, string parameters) { return(VarFormatterFactory.Build(format, parameters)); }
/// <summary> /// Get formatter by enum. /// </summary> /// <param name="format"></param> /// <param name="parameters"></param> /// <returns></returns> protected IVarFormatter GetFormatter( DefaultFormat format, string parameters ){ return VarFormatterFactory.Build(format, parameters); }
/// <summary> /// Create custom formatable var. /// </summary> /// <param name="name"></param> /// <param name="optional"></param> /// <param name="format"></param> /// <param name="formatParameters"></param> public FormatableVariable( string name, bool optional, DefaultFormat format, string formatParameters):base( name, optional ) { _formatter = GetFormatter( format, formatParameters ); }
//---------------------------------------------------------- private bool OnKeyTab(bool bEnAvant) { List <CValeurUnite> valeurs = CValeurUnite.DecomposeChaineFormattée(Text); int nIndexDansFormat = 0; int nSel = SelectionStart; StringBuilder bl = new StringBuilder(); List <int> nStartPos = new List <int>(); foreach (CValeurUnite valeur in valeurs) { nStartPos.Add(bl.Length); bl.Append(valeur.ToString()); } int nLastUnite = -1; List <string> strFormatsDef = new List <string>(); strFormatsDef.AddRange(DefaultFormat.Split(' ')); //Navigation dedans for (int nIndex = 0; nIndex < valeurs.Count; nIndex++) { string strTmp = valeurs[nIndex].ToString(); int nTmp = strFormatsDef.IndexOf(valeurs[nIndex].Unite); if (nTmp > nLastUnite) { nLastUnite = nTmp; } if (nSel < strTmp.Length + nIndexDansFormat) { Text = bl.ToString(); if (bEnAvant) { SelectionStart = nIndexDansFormat + strTmp.Length; if (nIndex < valeurs.Count - 1) { SelectionLength = valeurs[nIndex + 1].Valeur.ToString().Length; } return(true); } else { if (nIndex == 0) { return(false); } SelectionStart = nStartPos[nIndex - 1]; SelectionLength = valeurs[nIndex - 1].Valeur.ToString().Length; return(true); } } nIndexDansFormat += strTmp.Length; } if (bEnAvant) { if (nLastUnite + 1 < strFormatsDef.Count() && valeurs.Count > 0 && valeurs[valeurs.Count - 1].Unite.Trim() == "") { Text += strFormatsDef[nLastUnite + 1]; SelectionStart = Text.Length; SelectionLength = 0; return(true); } } return(false); }
public SparseTexture(int width, int height, DefaultFormat format, int mipCount) : this(width, height, SystemInfo.GetGraphicsFormat(format), mipCount) { }
/// <summary> /// Create custom formatable var. /// </summary> /// <param name="name"></param> /// <param name="optional"></param> /// <param name="format"></param> /// <param name="formatParameters"></param> public FormatableVariable(string name, bool optional, DefaultFormat format, string formatParameters) : base(name, optional) { _formatter = GetFormatter(format, formatParameters); }
public RenderTexture(int width, int height, int depth, DefaultFormat format) : this(width, height, depth, SystemInfo.GetGraphicsFormat(format)) { }
} // Dummy constructor public Texture2DArray(int width, int height, int depth, DefaultFormat format, TextureCreationFlags flags) { } // 0x00000001808DF900-0x00000001808DFA70
public Cubemap(int width, DefaultFormat format, TextureCreationFlags flags) : this(width, SystemInfo.GetGraphicsFormat(format), flags) { }
public virtual GraphicsFormat GetGraphicsFormat(DefaultFormat format) { return(UnityEngine.SystemInfo.GetGraphicsFormat(format)); }
public static GraphicsFormat GetGraphicsFormat(DefaultFormat format) { return(ShimManager.SystemInfoShim.GetGraphicsFormat(format)); }
/// <summary> /// Builds var formatter /// </summary> /// <param name="format"></param> /// <returns></returns> public static IVarFormatter Build(DefaultFormat format) { return(Build(format, null)); }
/// <summary> /// Constructor /// </summary> /// <param name="format"></param> protected BasicVarFormatter( DefaultFormat format) { _format = format; }
/// <summary> /// Constructor /// </summary> /// <param name="format"></param> /// <param name="aditionalParameters"></param> protected BasicVarFormatter(DefaultFormat format, string aditionalParameters) { _format = format; this._formatterParameters = aditionalParameters; }
} // Dummy constructor public CubemapArray(int width, int cubemapCount, DefaultFormat format, TextureCreationFlags flags) { } // 0x0000000180965F30-0x0000000180966040
} // Dummy constructor public Cubemap(int width, DefaultFormat format, TextureCreationFlags flags) { } // 0x00000001809663B0-0x00000001809664A0
} // Dummy constructor public Texture3D(int width, int height, int depth, DefaultFormat format, TextureCreationFlags flags) { } // 0x00000001808E1A40-0x00000001808E1BB0
public CubemapArray(int width, int cubemapCount, DefaultFormat format, TextureCreationFlags flags) : this(width, cubemapCount, SystemInfo.GetGraphicsFormat(format), flags) { }
/// <summary> /// Constructor /// </summary> /// <param name="format"></param> protected BasicVarFormatter(DefaultFormat format) { _format = format; }
public override GraphicsFormat GetGraphicsFormat(DefaultFormat format) { return(base.GetGraphicsFormat(format)); }