Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the VssComponentDescriptor class.
        /// </summary>
        public VssComponentDescriptor(IUIHost host, string writerName, IVssComponent component)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host", "host is null.");
            }

            if (component == null)
            {
                throw new ArgumentNullException("component", "component is null.");
            }

            WriterName = writerName;

            ComponentName = component.ComponentName;
            ComponentType = component.ComponentType;
            LogicalPath   = component.LogicalPath ?? String.Empty;

            if (LogicalPath.EndsWith("\\"))
            {
                FullPath = LogicalPath + ComponentName;
            }
            else
            {
                FullPath = LogicalPath + "\\" + ComponentName;
            }

            if (!FullPath.StartsWith("\\"))
            {
                FullPath = "\\" + FullPath;
            }
        }