public CustomTerminal(string name, MatchHandler handler, params string[] prefixes) : base(name) { _handler = handler; if (prefixes != null) { Prefixes.AddRange(prefixes); } }
public RegexBasedTerminal(string name, string pattern, params string[] prefixes) : base(name) { Pattern = pattern; if (prefixes != null) { Prefixes.AddRange(prefixes); } }
// Mono's C# compiler prefers this overload, which is incorrect. Marking it `private` to // to work around. // // See https://github.com/Pash-Project/Pash/issues/24 // // See https://github.com/Pash-Project/Pash/issues/29 // // See https://bugzilla.xamarin.com/show_bug.cgi?id=6541 private RegexBasedTerminal(string pattern, params string[] prefixes) : base("name") { Pattern = pattern; if (prefixes != null) { Prefixes.AddRange(prefixes); } }
public CustomTerminal(string name, MatchHandler handler, params string[] prefixes) : base(name) { _handler = handler; if (prefixes != null) { Prefixes.AddRange(prefixes); } this.EditorInfo = new TokenEditorInfo(TokenType.Unknown, TokenColor.Text, TokenTriggers.None); }
protected void Init(string cachekey, int?cachetime, string[] perfixes) { Key = cachekey; _keyFormat = cachekey; if (cachetime.HasValue) { CacheTime = cachetime.Value; } Prefixes.AddRange(perfixes.Where(perfix => string.IsNullOrEmpty(perfix))); }
/// <summary> /// Init instance of CacheKey /// </summary> /// <param name="cacheKey">Cache key</param> /// <param name="cacheTime">Cache time; set to null to use the default value</param> /// <param name="prefixes">Prefixes to remove by prefix functionality</param> protected void Init(string cacheKey, int?cacheTime = null, params string[] prefixes) { Key = cacheKey; _keyFormat = cacheKey; if (cacheTime.HasValue) { CacheTime = cacheTime.Value; } Prefixes.AddRange(prefixes.Where(prefix => !string.IsNullOrEmpty(prefix))); }
/// <summary> /// Initialize a new instance with key and prefixes /// </summary> /// <param name="key">Key</param> /// <param name="prefixes">Prefixes for remove by prefix functionality</param> public CacheKey(string key, params string[] prefixes) { Key = key; Prefixes.AddRange(prefixes.Where(prefix => !string.IsNullOrEmpty(prefix))); }