// Copyright 2003-2004 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. namespace Apache.Avalon.Composition.Data { using System; /// A DependencyDirective contains information describing how a /// dependency should be resolved. /// /// /// Stephen McConnell /// /// CVS $Revision: 1.2 $ $Date: 2004/02/28 22:15:36 $ /// [Serializable] public sealed class DependencyDirective { /// The dependency key that the directive refers to. private System.String m_key; /// The dependency source (possibly null) private System.String m_source; /// The set of features used during selection. private SelectionDirective[] m_features; /// Creation of a new dependency directive. /// /// /// the dependency key /// /// path to the source provider component /// public DependencyDirective(System.String key, System.String source) { m_key = key; m_source = source; m_features = new SelectionDirective[0]; } /// Creation of a new dependency directive. /// /// /// the dependency key /// /// the set of selection directives /// public DependencyDirective(System.String key, SelectionDirective[] features) { m_key = key; m_features = features; m_source = null; } /// Return the dependency key. /// the key /// public System.String Key { get { return m_key; } } /// Return the dependency source path. /// the path /// public System.String Source { get { return m_source; } } /// Return the set of selection directive constraints. /// the selection directive set /// public SelectionDirective[] SelectionDirectives { get { return m_features; } } } }