public void Clear() { foreach (var kvp in copySlots) { caches.Put(kvp.Value); } if (SourceContainer != null) { SourceContainer.MarkIf(null); } copySlots.Clear(); selectedItems.Clear(); ZetanUtility.SetActive(tips, true); WindowsManager.CloseWindow <ItemWindow>(); }
public void Clear() { foreach (Text title in titles) { title.text = string.Empty; titleCache.Put(title); } titles.Clear(); foreach (Text content in contents) { content.text = string.Empty; contentCache.Put(content); } contents.Clear(); foreach (RoleAttributeAgent attribute in attributes) { attribute.Clear(); attrCache.Put(attribute); } attributes.Clear(); foreach (var separ in separators) { separCache.Put(separ); } separators.Clear(); elementsCount = 0; item = null; icon.overrideSprite = null; nameText.text = string.Empty; typeText.text = string.Empty; priceText.text = string.Empty; weightText.text = string.Empty; }
/// <summary> Create the underlying "pool".</summary> /// <param name="rsvc"> /// </param> public virtual void Initialize(IRuntimeServices rsvc) { max = rsvc.GetInt(NVelocity.Runtime.RuntimeConstants.PARSER_POOL_SIZE, NVelocity.Runtime.RuntimeConstants.NUMBER_OF_PARSERS); pool = new SimplePool <Parser.Parser>(max); for (int i = 0; i < max; i++) { pool.Put(rsvc.CreateNewParser()); } if (rsvc.Log.DebugEnabled) { rsvc.Log.Debug("Created '" + max + "' parsers."); } }
/// <summary> Call the wrapped pool.</summary> /// <param name="parser"> /// </param> public virtual void Put(Parser.Parser parser) { parser.ReInit((ICharStream)null); pool.Put(parser); }