Repository navigation
Expand file tree
/
Copy pathCubeSourceCollection.cs
More file actions
63 lines (59 loc) · 1.77 KB
/
Copy pathCubeSourceCollection.cs
File metadata and controls
63 lines (59 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using FastReport.Utils;
namespace FastReport.Data
{
/// <summary>
/// Represents the collection of <see cref="CubeSourceBase"/> objects.
/// </summary>
public class CubeSourceCollection : FRCollectionBase
{
/// <summary>
/// Gets or sets a data source.
/// </summary>
/// <param name="index">The index of a data source in this collection.</param>
/// <returns>The data source with specified index.</returns>
public CubeSourceBase this[int index]
{
get { return List[index] as CubeSourceBase; }
set { List[index] = value; }
}
/// <summary>
/// Finds a CubeSource by its name.
/// </summary>
/// <param name="name">The name of a CubeSource.</param>
/// <returns>The <see cref="CubeSourceBase"/> object if found; otherwise <b>null</b>.</returns>
public CubeSourceBase FindByName(string name)
{
foreach (CubeSourceBase c in this)
{
if (c.Name == name)
return c;
}
return null;
}
/// <summary>
/// Finds a CubeSource by its alias.
/// </summary>
/// <param name="alias">The alias of a CubeSource.</param>
/// <returns>The <see cref="CubeSourceBase"/> object if found; otherwise <b>null</b>.</returns>
public CubeSourceBase FindByAlias(string alias)
{
foreach (CubeSourceBase c in this)
{
if (c.Alias == alias)
return c;
}
return null;
}
/// <summary>
/// Initializes a new instance of the <see cref="CubeSourceCollection"/> class with default settings.
/// </summary>
/// <param name="owner">The owner of this collection.</param>
public CubeSourceCollection(Base owner) : base(owner)
{
}
}
}