예제 #1
0
        /// <summary>
        /// Gets the node property.
        /// </summary>
        /// <param name="propId">Property id.</param>
        /// <returns>The property value.</returns>
        public override object GetProperty(int propId)
        {
            switch ((__VSHPROPID)propId)
            {
            case __VSHPROPID.VSHPROPID_DefaultNamespace:
                //this.Parent;

                return(null);

            case __VSHPROPID.VSHPROPID_IsNonMemberItem:
                return(IsNonMemberItem);

            default:
                __VSHPROPID4 id4 = (__VSHPROPID4)propId;
                switch (id4)
                {
                case __VSHPROPID4.VSHPROPID_BuildAction:
                    var props = this.NodeProperties as Nemerle.VisualStudio.Project.NemerleFileNodeProperties;
                    if (props == null)
                    {
                        return(base.GetProperty(propId));
                    }

                    return(props.NemerleBuildAction.ToString());

                default:
                    return(base.GetProperty(propId));
                }
            }
        }
 public static string GetProjectProperty(IVsHierarchy hierarchy, __VSHPROPID4 propertyId)
 {
     return(GetProjectProperty(hierarchy, (int)propertyId));
 }
예제 #3
0
파일: VsUtils.cs 프로젝트: rsdn/nitra
 public static T GetProp <T>(this IVsHierarchy hierarchy, uint currentItem, __VSHPROPID4 prop)
 {
     return(GetProp <T>(hierarchy, currentItem, (int)prop));
 }
예제 #4
0
파일: VsItem.cs 프로젝트: jrmwng/like2015
 public object GetProperty(__VSHPROPID4 vsPropID)
 {
     object objOut = null;
     m_vsHierarchy.GetProperty((uint)m_vsItemID, (int)vsPropID, out objOut);
     return objOut;
 }