Lack of documentation

Stimulsoft Reports.NET discussion
Post Reply
dikan
Posts: 203
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Lack of documentation

Post by dikan »

I saw some topics with MetaTags what is very important to me but could not find any documentation. Also, I saw some answers where you were specifies about changes in following release and there is no documentation about those changes.
I am sure that this part of your project will make it even more versatile and easier to implement.

Regards,
Djordje Radovanovic
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Lack of documentation

Post by Edward »

Hi Djordje,

Yes you are right, we are making some steps in that direction. And that is a very new property and it is works now as it was described here:

http://forum.stimulsoft.com/Default.aspx?g=posts&t=2347

Report.MetaTags is a property of StiMetaTagCollection type. Here is that class:

Code: Select all

public class StiMetaTagCollection : CollectionBase, ICloneable
{
    public void Add(StiMetaTag metaTag)
    {
        base.List.Add(metaTag);
    }

    public void Add(string name, string tag)
    {
        base.List.Add(new StiMetaTag(name, tag));
    }

    public void AddRange(StiMetaTag[] metaTags)
    {
        foreach (StiMetaTag tag in metaTags)
        {
            this.Add(tag);
        }
    }

    public void AddRange(StiMetaTagCollection metaTags)
    {
        foreach (StiMetaTag tag in metaTags)
        {
            this.Add(tag);
        }
    }

    public object Clone()
    {
        StiMetaTagCollection tags = new StiMetaTagCollection();
        foreach (StiMetaTag tag in base.List)
        {
            tags.Add((StiMetaTag) tag.Clone());
        }
        return tags;
    }

    public bool Contains(StiMetaTag metaTag)
    {
        return base.List.Contains(metaTag);
    }

    public int IndexOf(StiMetaTag metaTag)
    {
        return base.List.IndexOf(metaTag);
    }

    public void Insert(int index, StiMetaTag metaTag)
    {
        base.List.Insert(index, metaTag);
    }

    public void Remove(StiMetaTag metaTag)
    {
        base.List.Remove(metaTag);
    }

    public StiMetaTag this[string name]
    {
        get
        {
            foreach (StiMetaTag tag in base.List)
            {
                if (tag.Name == name)
                {
                    return tag;
                }
            }
            return null;
        }
        set
        {
            for (int i = 0; i < base.List.Count; i++)
            {
                StiMetaTag tag = base.List[i] as StiMetaTag;
                if (tag.Name == name)
                {
                    base.List[i] = value;
                    return;
                }
            }
            base.List.Add(value);
        }
    }

    public StiMetaTag this[int index]
    {
        get
        {
            return (StiMetaTag) base.List[index];
        }
        set
        {
            base.List[index] = value;
        }
    }
}



[StiSerializable, TypeConverter(typeof(StiMetaTagConverter))]
public class StiMetaTag : ICloneable
{
    private string name;
    private string tag;

    public StiMetaTag(string name, string tag)
    {
        this.name = name;
        this.tag = tag;
    }

    public object Clone()
    {
        return new StiMetaTag(this.Name, this.Tag);
    }

    public string Name
    {
        get
        {
            return this.name;
        }
        set
        {
            this.name = value;
        }
    }

    public string Tag
    {
        get
        {
            return this.tag;
        }
        set
        {
            this.tag = value;
        }
    }
}
Please feel free to ask if you have any questions.

Thank you.
dikan
Posts: 203
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Lack of documentation

Post by dikan »

When can we expect MetaTags in Designer?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Lack of documentation

Post by Edward »

Hi Djordje,

You can use this property from code right away in the current official release 2009.2.

Thank you.
Post Reply