public override void Register(SnippetInfo info, SnippetItem item)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info",
                                                "The snippet information cannot be null (or Nothing).");
            }
            if (item == null)
            {
                throw new ArgumentNullException("item",
                                                "The snippet item cannot be null (or Nothing).");
            }
            if (_dicSnippets == null)
            {
                _dicSnippets = new Dictionary <SnippetInfo, IList <SnippetItem> >();
            }

            IList <SnippetItem> listSnippets;

            if (_dicSnippets.TryGetValue(info, out listSnippets) == false)
            {
                listSnippets = new List <SnippetItem>();
                _dicSnippets.Add(info, listSnippets);
            }
            listSnippets.Add(item);
        }
        public override void Register(SnippetInfo info, SnippetItem item)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info",
                                                "The snippet information cannot be null (or Nothing).");
            }
            if (item == null)
            {
                throw new ArgumentNullException("item",
                                                "The snippet item cannot be null (or Nothing).");
            }

            this.Register(info.ExampleId, info.SnippetId,
                          item.Language, item.Text);
        }
Beispiel #3
0
 public abstract void Register(SnippetInfo Info, SnippetItem item);