/* * 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.Model { using System; using Apache.Avalon.Framework; using Apache.Avalon.Composition.Data; using Apache.Avalon.Meta; /// Defintion of a component deployment context. /// /// /// Avalon Development Team /// /// $Revision: 1.1 $ $Date: 2004/02/28 22:15:43 $ /// public struct IComponentContext_Fields { /// The standard context entry key for the partition name. public readonly static System.String PARTITION_KEY; /// The standard context entry key for the partition name. public readonly static System.String NAME_KEY; /// The standard context entry key for the partition name. //public readonly static System.String CLASSLOADER_KEY; /// The standard context entry key for the partition name. public readonly static System.String HOME_KEY; /// The standard context entry key for the partition name. public readonly static System.String TEMP_KEY; static IComponentContext_Fields() { PARTITION_KEY = ContextDescriptor.PARTITION_KEY; NAME_KEY = ContextDescriptor.NAME_KEY; //CLASSLOADER_KEY = ContextDescriptor.CLASSLOADER_KEY; HOME_KEY = ContextDescriptor.HOME_KEY; TEMP_KEY = ContextDescriptor.TEMP_KEY; } } public interface IComponentContext : IDeploymentContext { /// Return the working directory for the component. /// /// /// the working directory /// System.IO.FileInfo HomeDirectory { get; } /// Return the temporary directory for the component. /// /// /// the temporary directory /// System.IO.FileInfo TempDirectory { get; } /// Return the deployment profile. /// /// /// the profile /// ComponentProfile Profile { get; } /// Return the component type. /// /// /// the type defintion /// TypeDescriptor Type { get; } /// Return the component class. /// /// /// the class /// System.Type DeploymentType { get; } /// Return the enclosing containment model. /// the containment model that component is within /// IContainmentModel ContainmentModel { get; } /// Add a context entry model to the deployment context. /// the entry model /// void Register(IEntryModel model); /// Get a context entry from the deployment context. /// the entry lookup key /// /// value the corresponding value /// /// ContextException if a key corresponding to the supplied alias is unknown /// System.Object Resolve(System.String alias); } }