~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/EDMObjects/SSDL/SSDLContainer.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
#region Usings
 
5
 
 
6
using System;
 
7
using System.Collections.Generic;
 
8
using System.Linq;
 
9
using System.Text;
 
10
using ICSharpCode.Data.EDMDesigner.Core.EDMObjects.Common;
 
11
using System.Collections.ObjectModel;
 
12
 
 
13
#endregion
 
14
 
 
15
namespace ICSharpCode.Data.EDMDesigner.Core.EDMObjects.SSDL
 
16
{
 
17
    public class SSDLContainer : EDMObjectBase
 
18
    {
 
19
        #region Fields
 
20
 
 
21
        private EventedObservableCollection<EntityType.EntityType> _entityTypes;
 
22
        private EventedObservableCollection<Association.Association> _associationSets;
 
23
        private EventedObservableCollection<Function.Function> _functions;
 
24
 
 
25
        #endregion
 
26
 
 
27
        #region Properties
 
28
 
 
29
        public string Namespace { get; set; }
 
30
        public string Provider { get; set; }
 
31
        public string ProviderManifestToken { get; set; }
 
32
 
 
33
        public EventedObservableCollection<EntityType.EntityType> EntityTypes
 
34
        {
 
35
            get
 
36
            {
 
37
                if (_entityTypes == null)
 
38
                {
 
39
                    _entityTypes = new EventedObservableCollection<EntityType.EntityType>();
 
40
                    _entityTypes.ItemAdded += entityType => entityType.Container = this;
 
41
                }
 
42
 
 
43
                return _entityTypes;
 
44
            }
 
45
        }
 
46
 
 
47
        public EventedObservableCollection<Association.Association> AssociationSets
 
48
        {
 
49
            get
 
50
            {
 
51
                if (_associationSets == null)
 
52
                {
 
53
                    _associationSets = new EventedObservableCollection<Association.Association>();
 
54
                    _associationSets.ItemAdded += association => association.Container = this;
 
55
                }
 
56
 
 
57
                return _associationSets;
 
58
            }
 
59
        }
 
60
 
 
61
        public EventedObservableCollection<Function.Function> Functions
 
62
        {
 
63
            get
 
64
            {
 
65
                if (_functions == null)
 
66
                {
 
67
                    _functions = new EventedObservableCollection<Function.Function>();
 
68
                }
 
69
 
 
70
                return _functions;
 
71
            }
 
72
        }
 
73
 
 
74
        #endregion
 
75
    }
 
76
}