当前位置: 首页>>代码示例>>C#>>正文


C# PropertyType.ToString方法代码示例

本文整理汇总了C#中PropertyType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# PropertyType.ToString方法的具体用法?C# PropertyType.ToString怎么用?C# PropertyType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PropertyType的用法示例。


在下文中一共展示了PropertyType.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ParsePropertyValue

 private object ParsePropertyValue(CommandParam param, PropertyType type)
 {
     if (type == PropertyType.String) {
         if (param.IsValidType(CommandParamType.String))
             return param.StringValue;
     }
     else if (type == PropertyType.Integer) {
         if (param.IsValidType(CommandParamType.Integer))
             return param.IntValue;
     }
     else if (type == PropertyType.Float) {
         if (param.IsValidType(CommandParamType.Float))
             return param.FloatValue;
     }
     else if (type == PropertyType.Boolean) {
         if (param.IsValidType(CommandParamType.Boolean))
             return param.BoolValue;
     }
     else if (type == PropertyType.List)
         ThrowParseError("Lists are unsupported as a property type");
     ThrowParseError("The property value '" + param.StringValue + "' is not of type " + type.ToString());
     return null;
 }
开发者ID:trigger-death,项目名称:ZeldaOracle,代码行数:23,代码来源:TilesetSR.cs

示例2: GetProperty

 /// <summary>
 ///     Devuelve la propiedad del campo especificada
 /// </summary>
 /// <param name="sNombreCampo">
 ///     Nombre del campo a buscar
 /// </param>
 /// <param name="oPropiedad">
 ///     Propiedad que se va a devolver
 /// </param>
 /// <returns>
 ///     Devuelve el valor de la propiedad
 /// </returns>
 public String GetProperty(String sNombreCampo, PropertyType oPropiedad)
 {
     //obtiene el campo a buscar
     var oProperty = (Hashtable) OColumns[sNombreCampo];
     //devuelve el valor de la propiedad especificada del campo
     return oProperty[oPropiedad.ToString()].ToString();
 }
开发者ID:developerFranjfgcarmo,项目名称:SimpleDataMapper,代码行数:19,代码来源:ClsStructure.cs

示例3: ProcessPropertyTable

        /// <summary>
        /// Processes the Property table writing only the specified types
        /// of properties out to the xml stream.
        /// </summary>
        /// <param name="processPropertyType">Type of properties to process out of the table.</param>
        /// <param name="propertyHash">Hashtable to which to add the properties being processed.</param>
        /// <remarks>This is a terribly inefficient way to process the Property table.</remarks>
        private void ProcessPropertyTable(PropertyType processPropertyType, Hashtable propertyHash)
        {
            const string tableName = "Property";
            const string tableNameDependent = "AppSearch";
            bool hasAppSearchTable = false;
            if (!this.inputDatabase.TableExists(tableName))
            {
                return;
            }

            if (this.inputDatabase.TableExists(tableNameDependent))
            {
                hasAppSearchTable = true;
            }
            this.core.OnMessage(WixVerboses.ProcessingPropertyType(null, VerboseLevel.Verbose, processPropertyType.ToString()));

            string property;
            string value;
            PropertyType propertyType = PropertyType.Ignore;

            using (View view = this.inputDatabase.OpenExecuteView(String.Concat("SELECT * FROM `", tableName, "`")))
            {
                Record record;
                while (view.Fetch(out record))
                {
                    property = record[(int)MsiInterop.Property.Property];
                    value = record[(int)MsiInterop.Property.Value];
                    switch (property)
                    {
                        case "UpgradeCode":
                            propertyType = PropertyType.Package;
                            value = this.StripBraces(value);
                            break;
                        case "ProductCode":
                            propertyType = PropertyType.Package;
                            property = "Id";
                            value = this.StripBraces(value);
                            break;
                        case "Manufacturer":
                            propertyType = PropertyType.Package;
                            property = "Manufacturer";
                            break;
                        case "ProductName":
                            propertyType = PropertyType.Package;
                            property = "Name";
                            break;
                        case "ProductLanguage":
                            propertyType = PropertyType.Package;
                            property = "Language";
                            break;
                        case "ProductVersion":
                            propertyType = PropertyType.Package;
                            property = "Version";
                            break;
                        case "XMLSchema":
                            propertyType = PropertyType.Ignore;

                            //should be we use this over again?
                            break;
                        case "ErrorDialog":
                            propertyType = PropertyType.UI;
                            break;
                        case "DefaultUIFont":
                            propertyType = PropertyType.UI;
                            break;
                        case "AdminProperties":
                            this.InsertProperties(this.adminPropNames, value);
                            continue;
                        case "MsiHiddenProperties":
                            this.InsertProperties(this.hiddenPropNames, value);
                            continue;
                        case "SecureCustomProperties":
                            this.InsertProperties(this.securePropNames, value);
                            continue;
                        default:
                            propertyType = PropertyType.Product;
                            break;
                    }

                    bool hasAppSearchEntry = false;
                    if (hasAppSearchTable)
                    {
                        using (View appSearchView = this.inputDatabase.OpenExecuteView(String.Concat("SELECT * FROM `", tableNameDependent, "` WHERE `", tableNameDependent, "`.`", tableName, "`='", property, "'")))
                        {
                            Record appSearchRecord;
                            while (appSearchView.Fetch(out appSearchRecord))
                            {
                                if (null != appSearchRecord)
                                {
                                    hasAppSearchEntry = true;
                                }
                            }
                        }
//.........这里部分代码省略.........
开发者ID:sillsdev,项目名称:FwSupportTools,代码行数:101,代码来源:Decompiler.cs

示例4: WritePropHeader

 public static void WritePropHeader(this Stream stream, IMEPackage pcc, string propName, PropertyType type, int size)
 {
     stream.WriteValueS32(pcc.FindNameOrAdd(propName));
     stream.WriteValueS32(0);
     stream.WriteValueS32(pcc.FindNameOrAdd(type.ToString()));
     stream.WriteValueS32(0);
     stream.WriteValueS32(size);
     stream.WriteValueS32(0);
 }
开发者ID:ME3Explorer,项目名称:ME3Explorer,代码行数:9,代码来源:PropertyReader.cs

示例5: SearchResidentialRentalProperties

        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Residential Rental Property.
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <param name="bathroomsMin">Minimum number of bathrooms.</param>
        /// <param name="bathroomsMax">Maximum number of bathrooms.</param>
        /// <param name="bedroomsMin">Minimum number of bedrooms.</param>
        /// <param name="bedroomsMax">Maximum number of bedrooms.</param>
        /// <param name="areaMax">Maximum square area in square meters.</param>
        /// <param name="areaMin">Minimum floor area in square meters.</param>
        /// <param name="landAreaMin">Minimum land area in square meters.</param>
        /// <param name="landAreaMax">Maximum land area in square meters.</param>
        /// <param name="propertyType">The type of the property.</param>
        /// <param name="adjacentSuburbs">Indicates whether the search should include listings in adjacent suburbs.</param>
        /// <returns>Properties.</returns>
        public global::Properties SearchResidentialRentalProperties(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax,
            int? bathroomsMin,
            int? bathroomsMax,
            int? bedroomsMin,
            int? bedroomsMax,
            int? areaMax,
            int? areaMin,
            int? landAreaMin,
            int? landAreaMax,
            PropertyType propertyType,
            bool? adjacentSuburbs)
        {
            var url = String.Format(Constants.Culture, "{0}{1}/{2}/Rental{3}", _connection.BaseUrl, Constants.SEARCH, Constants.PROPERTY, Constants.XML);
            _addAnd = false;
            var conditions = "?";

            // create the parameters for the query string
            conditions += this.PropertyHelper(searchString, sortOrder.ToString(), page, rows, region, district, suburb, dateFrom, priceMin, priceMax, landAreaMin, landAreaMax);
            conditions += ResidentialPropertyHelper(bathroomsMin, bathroomsMax, bedroomsMax, bedroomsMin, areaMax, areaMin, propertyType.ToString(), adjacentSuburbs);

            // add the parameters to the query string if there are any
            if (conditions.Equals("?"))
            {
                url += conditions;
            }

            // perform the request
            return this.PropertyConnectionHelper(url);
        }
开发者ID:KinoZha,项目名称:trade-me-api-wrapper,代码行数:67,代码来源:SearchMethods.cs

示例6: PropTypeNode

 public PropTypeNode(PropertyType type)
 {
     Type = type;
     Text = type.ToString() + " (PT)";
 }
开发者ID:kornelijepetak,项目名称:supramold,代码行数:5,代码来源:PropTypeNode.cs


注:本文中的PropertyType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。