Microsoft.VisualStudio.Project.FileNode.SetProperty C# (CSharp) Method

SetProperty() public method

Sets the node property.
public SetProperty ( int propid, object value ) : int
propid int Property id.
value object Property value.
return int
        public override int SetProperty(int propid, object value)
        {
            int result;
            __VSHPROPID id = (__VSHPROPID)propid;
            switch (id)
            {
            case __VSHPROPID.VSHPROPID_IsNonMemberItem:
                if (value == null)
                {
                    throw new ArgumentNullException("value");
                }

                bool boolValue;
                CciTracing.TraceCall(this.Id + "," + id.ToString());
                if (Boolean.TryParse(value.ToString(), out boolValue))
                {
                    this.IsNonmemberItem = boolValue;
                }
                else
                {
                    Trace.WriteLine("Could not parse the IsNonMemberItem property value.");
                }

                result = VSConstants.S_OK;
                break;

            default:
                result = base.SetProperty(propid, value);
                break;
            }

            return result;
        }