Microsoft.VisualStudio.Project.ProjectNode.GetSccFiles C# (CSharp) Method

GetSccFiles() public method

This method is called to determine which files should be placed under source control for a given VSITEMID within this hierarchy.
public GetSccFiles ( uint itemid, CALPOLESTR stringsOut, CADWORD flagsOut ) : int
itemid uint Identifier for the VSITEMID being queried.
stringsOut CALPOLESTR Pointer to an array of CALPOLESTR strings containing the file names for this item.
flagsOut CADWORD Pointer to a CADWORD array of flags stored in DWORDs indicating that some of the files have special behaviors.
return int
        public virtual int GetSccFiles(uint itemid, CALPOLESTR[] stringsOut, CADWORD[] flagsOut)
        {
            if (itemid == VSConstants.VSITEMID_SELECTION)
            {
                throw new ArgumentException(SR.GetString(SR.InvalidParameter, CultureInfo.CurrentUICulture), "itemid");
            }

            HierarchyNode n = this.NodeFromItemId(itemid);
            if (n == null)
            {
                throw new ArgumentException(SR.GetString(SR.InvalidParameter, CultureInfo.CurrentUICulture), "itemid");
            }

            List<string> files = new List<string>();
            List<tagVsSccFilesFlags> flags = new List<tagVsSccFilesFlags>();

            n.GetSccFiles(files, flags);

            if (stringsOut != null && stringsOut.Length > 0)
            {
                stringsOut[0] = Utilities.CreateCALPOLESTR(files);
            }

            if (flagsOut != null && flagsOut.Length > 0)
            {
                flagsOut[0] = Utilities.CreateCADWORD(flags);
            }

            return VSConstants.S_OK;
        }
ProjectNode