コード例 #1
0
        protected override AssemblyReferenceNode CreateAssemblyReferenceNode(ProjectElement element)
        {
            AssemblyReferenceNode node = null;

            try
            {
                node = new XSharpAssemblyReferenceNode(this.ProjectMgr, element);
            }
            catch (Exception e)
            {
                XSettings.LogException(e, "CreateAssemblyReferenceNode");
            }
            ReferenceNode existing = null;

            if (isDuplicateNode(node, ref existing))
            {
                AssemblyReferenceNode existingNode = existing as AssemblyReferenceNode;
            }
            return(node);
        }
コード例 #2
0
        protected override AssemblyReferenceNode CreateAssemblyReferenceNode(ProjectElement element)
        {
            AssemblyReferenceNode node = null;

            try
            {
                node = new XSharpAssemblyReferenceNode(this.ProjectMgr, element);
            }
            catch (Exception e)
            {
                XSharpProjectPackage.Instance.DisplayException(e);
            }
            ReferenceNode existing = null;

            if (isDuplicateNode(node, ref existing))
            {
                AssemblyReferenceNode existingNode = existing as AssemblyReferenceNode;
            }
            return(node);
        }
コード例 #3
0
        /// <summary>
        /// Creates an assembly reference node from a file path.
        /// </summary>
        protected override AssemblyReferenceNode CreateAssemblyReferenceNode(string fileName)
        {
            AssemblyReferenceNode node = null;

            try
            {
                // Ok when file name is a full path or when it doesn't have a DLL extension
                if (!File.Exists(fileName))
                {
                    if (fileName.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
                    {
                        fileName = Path.GetFileNameWithoutExtension(fileName);
                    }
                }
                node = new XSharpAssemblyReferenceNode(this.ProjectMgr, fileName);
            }
            catch (Exception e)
            {
                XSettings.LogException(e, "CreateAssemblyReferenceNode");
            }
            return(node);
        }
コード例 #4
0
 internal XSharpAssemblyReferenceNodeProperties(XSharpAssemblyReferenceNode node)
     : base(node)
 {
     _node = node;
 }