diff --git a/CSharp/Plugins/UniversalEditor.Plugins.Microsoft/ObjectModels/Package/Relationships/Relationship.cs b/CSharp/Plugins/UniversalEditor.Plugins.Microsoft/ObjectModels/Package/Relationships/Relationship.cs index 81e893d9..f1c989af 100644 --- a/CSharp/Plugins/UniversalEditor.Plugins.Microsoft/ObjectModels/Package/Relationships/Relationship.cs +++ b/CSharp/Plugins/UniversalEditor.Plugins.Microsoft/ObjectModels/Package/Relationships/Relationship.cs @@ -10,7 +10,20 @@ namespace UniversalEditor.ObjectModels.Package.Relationships public class RelationshipCollection : System.Collections.ObjectModel.Collection { - + /// + /// Gets all s with the specified schema. + /// + /// The schema to search for. + /// Array of objects whose Schema property is set to the specified value. + public Relationship[] GetBySchema(string schema) + { + List rels = new List(); + foreach (Relationship rel in this) + { + if (rel.Schema == schema) rels.Add(rel); + } + return rels.ToArray(); + } } private string mvarID = String.Empty; @@ -22,8 +35,6 @@ namespace UniversalEditor.ObjectModels.Package.Relationships private string mvarTarget = String.Empty; public string Target { get { return mvarTarget; } set { mvarTarget = value; } } - - public object Clone() { Relationship clone = new Relationship();