Microsoft.VisualStudio.Project.Output.get_Property C# (CSharp) Method

get_Property() public method

public get_Property ( string szProperty, object &pvar ) : int
szProperty string
pvar object
return int
        public virtual int get_Property(string szProperty, out object pvar)
        {
            if (string.IsNullOrEmpty(szProperty))
            {
                pvar = null;
                return VSConstants.E_INVALIDARG;
            }

            if (string.Equals(szProperty, "OUTPUTLOC", StringComparison.OrdinalIgnoreCase))
            {
                szProperty = ProjectFileConstants.FinalOutputPath;
            }

            string value = output.GetMetadataValue(szProperty);
            pvar = value;

            // If we don't have a value, we are expected to return unimplemented
            if (string.IsNullOrEmpty(value))
            {
                return VSConstants.E_NOTIMPL;
            }

            // Special hack for COM2REG property: it's a bool rather than a string, and always true, for some reason.
            if (string.Equals(szProperty, "COM2REG", StringComparison.OrdinalIgnoreCase))
            {
                pvar = true;
            }

            return VSConstants.S_OK;
        }