コード例 #1
0
ファイル: SelectContextFrm.cs プロジェクト: wangchunlei/MyGit
 public SelectContextFrm(Dictionary<string, string> beDic, string projectName, VSLangProj.VSProject curProj)
 {
     InitializeComponent();
     this.BEList = beDic;
     this.projectName = projectName;
     this.CurProj = curProj;
 }
コード例 #2
0
ファイル: ReferenceEventArgs.cs プロジェクト: rsdn/nitra
    public ReferenceEventArgs(IVsHierarchy hierarchy, uint itemId, VSLangProj.Reference reference)
    {
      ErrorHelper.ThrowIsNull(hierarchy, nameof(hierarchy));
      ErrorHelper.ThrowIsNull(reference, nameof(reference));

      Hierarchy = hierarchy;
      ItemId    = itemId;
      Reference = reference;
    }
コード例 #3
0
        public VSMDPythonProvider(VSLangProj.VSProject project)
        {
            if (project == null)
                throw new ArgumentNullException("project");

            vsproject = project;

            // Create the provider
            this.ReferencesEvents_ReferenceRemoved(null);
            vsproject.Events.ReferencesEvents.ReferenceAdded += new VSLangProj._dispReferencesEvents_ReferenceAddedEventHandler(ReferencesEvents_ReferenceAdded);
            vsproject.Events.ReferencesEvents.ReferenceRemoved += new VSLangProj._dispReferencesEvents_ReferenceRemovedEventHandler(ReferencesEvents_ReferenceRemoved);
            vsproject.Events.ReferencesEvents.ReferenceChanged += new VSLangProj._dispReferencesEvents_ReferenceChangedEventHandler(ReferencesEvents_ReferenceRemoved);
        }
コード例 #4
0
 /// <summary>
 /// When a reference is removed/changed, let the provider know
 /// </summary>
 /// <param name="reference">Reference being removed</param>
 void ReferencesEvents_ReferenceRemoved(VSLangProj.Reference reference)
 {
     // Because our provider only has an AddReference method and no way to
     // remove them, we end up having to recreate it.
     provider = new IronPython.CodeDom.PythonProvider();
     if (vsproject.References != null)
     {
         foreach (VSLangProj.Reference currentReference in vsproject.References)
         {
             provider.AddReference(currentReference.Path);
         }
     }
 }
コード例 #5
0
 /// <summary>
 /// When a reference is added, add it to the provider
 /// </summary>
 /// <param name="reference">Reference being added</param>
 void ReferencesEvents_ReferenceAdded(VSLangProj.Reference reference)
 {
     provider.AddReference(reference.Path);
 }
コード例 #6
0
 void VSLangProj.VSProject.Exec(VSLangProj.prjExecCommand command, int bSuppressUI, object varIn, out object pVarOut)
 {
     throw new Exception("The method or operation is not implemented.");
 }
コード例 #7
0
 void VSLangProj.VSProject.CopyProject(string bstrDestFolder, string bstrDestUNCPath, VSLangProj.prjCopyProjectOption copyProjectOption, string bstrUsername, string bstrPassword)
 {
     throw new Exception("The method or operation is not implemented.");
 }
コード例 #8
0
ファイル: ProjectManager.cs プロジェクト: codemonkies/UTGV1.0
      static public void AddReferencesToProject(VSLangProj.References references, Project project)
      {
         if (project == null)
            throw new Exception("Invalid  Project parameter");

         VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;

         foreach (VSLangProj.Reference refernce in references)
         {
            try
            {

               vsProject.References.Add(refernce.Path);
            }
            catch (Exception ex)
            {
               //ignore...
               Logger.LogException(ex);
            }
         }
      }
コード例 #9
0
        /// <summary>
        /// Creates the visual studio reference from reference.
        /// </summary>
        /// <param name="solution">The solution.</param>
        /// <param name="pReference">The p reference.</param>
        /// <returns></returns>
        internal static ProjectReference CreateVisualStudioReferenceFromReference(SolutionNode solution, VSLangProj.Reference pReference)
        {
            if (pReference == null || (pReference.SourceProject == null && String.IsNullOrEmpty(pReference.Path)))
                return null;

            string strongName = null;
            if (pReference.StrongName)
            {
                string culture = pReference.Culture;
                if (String.IsNullOrEmpty(culture))
                    culture = "neutral";
                strongName = String.Format("{0}, Version={1}, Culture={2}, PublicKeyToken={3}", pReference.Name, pReference.Version, culture, pReference.PublicKeyToken);
            }
            else
                strongName = String.Format("{0}, Version={1}", pReference.Name, pReference.Version);

            return CreateVSReference(solution, pReference.ContainingProject, pReference.SourceProject, pReference.Name, pReference.Path, pReference.Version, strongName, pReference.CopyLocal);
        }
コード例 #10
0
ファイル: VSProjectWrapper.cs プロジェクト: kiliman/NuForVS
 public VSProjectWrapper(VSLangProj.VSProject vsproj)
 {
     _vsproj = vsproj;
 }