• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ParameterType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ParameterType的典型用法代码示例。如果您正苦于以下问题:C# ParameterType类的具体用法?C# ParameterType怎么用?C# ParameterType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ParameterType类属于命名空间,在下文中一共展示了ParameterType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InvocationParameterInfo

 public InvocationParameterInfo(string name, int index, Type type, ParameterType parameterType)
 {
     Name = name;
     Index = index;
     Type = type;
     ParameterType = parameterType;
 }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:7,代码来源:InvocationParameterInfo.cs


示例2: Parameter

 public Parameter(ParameterType parType, TokenTypes tokType, object column, object value)
 {
     this.TokType = tokType;
     this.ParType = parType;
     this.Column = column.ToString();
     this.Value = value;
 }
开发者ID:TaylorLi,项目名称:gettogether,代码行数:7,代码来源:Parameter.cs


示例3: DrawGUI

 public override void DrawGUI(IntelligenceState parentState, Intelligence intelligence, CallbackCollection callbacks)
 {
     #if UNITY_EDITOR
     UnityEditor.EditorGUILayout.BeginHorizontal();
     UnityEngine.GUILayout.Label("Method name:");
     methodName = UnityEditor.EditorGUILayout.TextField(methodName);
     UnityEditor.EditorGUILayout.EndHorizontal();
     useTargetVar = UnityEditor.EditorGUILayout.Toggle("Use other target", useTargetVar);
     if (useTargetVar)
     {
         UnityEditor.EditorGUILayout.BeginHorizontal();
         UnityEngine.GUILayout.Label("Target var name:");
         targetVarName = UnityEditor.EditorGUILayout.TextField(targetVarName);
         UnityEditor.EditorGUILayout.EndHorizontal();
     }
     paramType = (ParameterType)UnityEditor.EditorGUILayout.EnumPopup("Parameter:", paramType);
     if (paramType == ParameterType.VarValue)
     {
         UnityEditor.EditorGUILayout.BeginHorizontal();
         UnityEngine.GUILayout.Label("Var name:");
         paramTypeValue = UnityEditor.EditorGUILayout.TextField(paramTypeValue);
         UnityEditor.EditorGUILayout.EndHorizontal();
     }
     if (paramType == ParameterType.String)
     {
         UnityEditor.EditorGUILayout.BeginHorizontal();
         UnityEngine.GUILayout.Label("Value:");
         paramTypeValue = UnityEditor.EditorGUILayout.TextField(paramTypeValue);
         UnityEditor.EditorGUILayout.EndHorizontal();
     }
     #endif
 }
开发者ID:Nachtrind,项目名称:Fungus,代码行数:32,代码来源:ExecuteMethod.cs


示例4: PersistedParameterInfo

 public PersistedParameterInfo(string name, ParameterType parameterType, bool nullable, string defaultValue)
 {
     Name = name;
     ParameterType = parameterType;
     Nullable = nullable;
     DefaultValue = defaultValue;
 }
开发者ID:shayaneumar,项目名称:gabbar,代码行数:7,代码来源:ReportsController.cs


示例5: ProcedureParameter

 public ProcedureParameter(string name, ParameterType type, object value, int size)
 {
     Name = name;
     Type = type;
     Value = value;
     Size = size;
 }
开发者ID:rohitdaryanani,项目名称:TekSuite,代码行数:7,代码来源:ProcedureParameter.cs


示例6: ParameterDefinition

 public ParameterDefinition(string name, ParameterType type, int min, int max)
 {
     this.name = name;
     this.type = type;
     this.min = min;
     this.max = max;
 }
开发者ID:federicodangelo,项目名称:ProceduralContentGenerator,代码行数:7,代码来源:ParameterDefinition.cs


示例7: Parameter

 public Parameter(ParameterInfo parameterInfo, object value, ParameterType parameterType)
 {
     ParameterInfo = parameterInfo;
     ParameterValue = value;
     ParameterType = parameterType;
     Type = value.GetType();
 }
开发者ID:daniel-tell,项目名称:Web-Anchor,代码行数:7,代码来源:Parameter.cs


示例8: Parameter

 public Parameter(string name, ParameterType type, string minValue, string maxValue)
 {
     this.nameField = name;
     this.typeField = type;
     this.minValueField = minValue;
     this.maxValueField = maxValue;
 }
开发者ID:blueskywyf,项目名称:ShowMaker,代码行数:7,代码来源:Parameter.cs


示例9: Parameter

 public Parameter(string name, ParameterType type, string desc, int value = 0)
 {
     Name = name;
     ParameterType = type;
     Description = desc;
     Value = value;
 }
开发者ID:ke4vtw,项目名称:TLCPU,代码行数:7,代码来源:Parameter.cs


示例10: ParameterControl

        public ParameterControl(ArticleRecord article, ParameterType type, int batchNumber)
            : this()
        {
            Article = article;
            _parameterType = type;
            InitPropertiesByType(type);
            BatchNumber = batchNumber;
            NewMeasurementsDataGrid.ItemsSource = _batch;
            InitUpdateMeasuredValueTimer();

            _inputDevice.DataReceived += inputDevice_DataReceived;
            _inputDevice.ErrorReceived += inputDevice_ErrorReceived;

            _bwloader.DoWork += bwloader_DoWork;
            _bwloader.RunWorkerCompleted += bwloader_RunWorkerCompleted;

            //MeasuringValueBG1.Minimum = MeasuringValueBG2.Minimum = _nominalValue;
            //MeasuringValueBG2.Maximum = _maxValue + 3;
            //_difference = _nominalValue - _minValue;
            //MeasuringValueBG1.Maximum = _nominalValue + _difference +3;
            MeasuringValueBG1.Minimum = MeasuringValueBG2.Minimum = _nominalValue;
            MeasuringValueBG2.Maximum = 14;
            _difference = _nominalValue - _minValue;
            MeasuringValueBG1.Maximum = 14;

            _bwloader.RunWorkerAsync();
        }
开发者ID:alexrigin,项目名称:HMS2,代码行数:27,代码来源:ParameterControl.xaml.cs


示例11: GetParameterType

 private static Anito.Data.ParameterType GetParameterType(ParameterType parameterType)
 {
     switch (parameterType)
     {
         case ParameterType.Binary:
             return Anito.Data.ParameterType.Binary;
         case ParameterType.Boolean:
             return Anito.Data.ParameterType.Boolean;
         case ParameterType.Byte:
             return Anito.Data.ParameterType.Byte;
         case ParameterType.Currency:
             return Anito.Data.ParameterType.Currency;
         case ParameterType.DateTime:
             return Anito.Data.ParameterType.DateTime;
         case ParameterType.Decimal:
             return Anito.Data.ParameterType.Decimal;
         case ParameterType.Double:
             return Anito.Data.ParameterType.Double;
         case ParameterType.Int16:
             return Anito.Data.ParameterType.Int16;
         case ParameterType.Int32:
             return Anito.Data.ParameterType.Int32;
         case ParameterType.Int64:
             return Anito.Data.ParameterType.Int64;
         case ParameterType.Single:
             return Anito.Data.ParameterType.Single;
         case ParameterType.String:
             return Anito.Data.ParameterType.String;
         case ParameterType.UId:
             return Anito.Data.ParameterType.UId;
         default:
             return Anito.Data.ParameterType.String;
     }
 }
开发者ID:rellydinio,项目名称:Freetime-Generic-Platform,代码行数:34,代码来源:StoredProcedure.cs


示例12: ToParameters

        /// <summary>
        /// Converts the object to an array of RestSharp parameters.
        /// </summary>
        /// <returns>The array of RestSharp parameters.</returns>
        public IEnumerable<Parameter> ToParameters(ParameterType type)
        {
            List<Parameter> output = new List<Parameter>();

            //Inspiration for this code from https://github.com/jaymedavis/stripe.net
            foreach (PropertyInfo property in GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
            {
                object value = property.GetValue(this, null);
                string propName = property.Name;

                if (value == null)
                {
                    continue;
                }

                if (property.CustomAttributes.Any(x => x.AttributeType == typeof(JsonPropertyAttribute)))
                {
                    //Get the JsonPropertyAttribute for this property, which will give us its JSON name
                    JsonPropertyAttribute attribute = property.GetCustomAttributes(typeof(JsonPropertyAttribute), false).Cast<JsonPropertyAttribute>().FirstOrDefault();

                    propName = attribute != null ? attribute.PropertyName : property.Name;
                }

                var parameter = ToSingleParameter(propName, value, property, type);

                output.Add(parameter);
            }

            return output;
        }
开发者ID:squallop,项目名称:ShopifySharp,代码行数:34,代码来源:Parameterizable.cs


示例13: WrongParameterTypeException

        internal WrongParameterTypeException(string parameterName, ParameterType oldParameterType, ParameterType newParameterType)
        {
            mParameterName = parameterName;

            mOldParameterType = oldParameterType;
            mNewParameterType = newParameterType;
        }
开发者ID:Mnix,项目名称:MNIX.HttpRequester,代码行数:7,代码来源:WrongParameterTypeException.cs


示例14: GetParameter

        /// <summary>
        /// Returns shared or built-in parameter of the specified name. parameter.IsShared property identifies the type.
        /// If it does not exist it is created in the shared parameters file with specified name in the specified group. That must be defined in advance
        /// using SetDefinitionFile() function.
        /// </summary>
        /// <param name="paramType">Type of the parameter (simplified to base data types)</param>
        /// <param name="groupName">Name of the group of the shared parameters</param>
        /// <param name="parameterName">Name of the parameter</param>
        /// <param name="group">Revit built in parameter group where the parameter is to be created if it doesn't exist</param>
        /// <returns>Existing or new parameter</returns>
        public static Parameter GetParameter(this Element element, ParameterType paramType, string parameterName, BuiltInParameterGroup group)
        {
            Parameter parameter = element.get_Parameter(parameterName);
            if (parameter != null)
            {
                //check type and throw error if the type is different
                if (parameter.Definition.ParameterType == paramType)
                    return parameter; //returns existing parameter (it could be any type of parameter not only shared parameter)
                else
                    throw new Exception(String.Format("Parameter type mismatch for pID '{0}': existing type: {1}, desired type {2}.", parameterName, parameter.Definition.ParameterType, paramType));
            }

            // Create a category set and insert category of wall to it
            CategorySet myCategories = element.Document.Application.Create.NewCategorySet();
            // Use BuiltInCategory to get category of wall
            Category myCategory = element.Category;

            myCategories.Insert(myCategory);

            bool success = SetNewSharedParameter(element, paramType, myCategories, parameterName, group);

            if (!success)
            {
                Debug.WriteLine("Parameter creation not successfull.\nParameter name: " + parameterName + "\n Existing parameters:");
                foreach (Parameter par in element.Parameters)
                {
                    Debug.WriteLine("Parameter name: " + par.Definition.Name + ", group: " + Enum.GetName(typeof(BuiltInParameterGroup), par.Definition.ParameterGroup));
                }
                throw new Exception("Parameter creation failed.");
            }

            parameter = element.get_Parameter(parameterName);
            return parameter;
        }
开发者ID:martin1cerny,项目名称:BIM-Library-CZ-Revit,代码行数:44,代码来源:ElementExtensions.cs


示例15: JConnect

        public JConnect(IDbConnection connection)
        {
            this.connection = connection;
              commandTimeout = 30;
              Type type = connection.GetType();

              if (type == typeof(System.Data.Odbc.OdbcConnection))
              {
            typeOfParameter = ParameterType.QuestionMark;
            typeOfVendor = VendorType.Odbc;
              }
              else if (type == typeof(System.Data.OleDb.OleDbConnection))
              {
            typeOfParameter = ParameterType.QuestionMark;
            typeOfVendor = VendorType.OleDb;
              }
              else if (type == typeof(System.Data.SqlClient.SqlConnection))
              {
            typeOfParameter = ParameterType.AtSymbol;
            typeOfVendor = VendorType.SqlServer;
            GetReturningProc += new GetReturningHandler(SqlServerReturning);
              }
              else
              {
            typeOfParameter = ParameterType.Colon;
            typeOfVendor = VendorType.Oracle;
            GetReturningProc += new GetReturningHandler(OracleReturning);
              }
              GetTimeStampProc += new GetTimeStampHandler(DefaultGetTimeStampProc);
        }
开发者ID:VincentRisi,项目名称:jportal,代码行数:30,代码来源:Portal.cs


示例16: Parameter

 public Parameter(string id, Object val, List<Object> possibleVal, Object defVal, ParameterType typ)
 {
     this.ID = id;
     this.value = val;
     this.possibleValues = possibleVal;
     this.defaultValue = defVal;
     this.paramType = typ;
 }
开发者ID:hergin,项目名称:SortingOOP,代码行数:8,代码来源:Parameter.cs


示例17: Binding

			public Binding(PhpReference/*!*/ variable, IDataParameter/*!*/ parameter, ParameterType type)
			{
				Debug.Assert(variable != null && parameter != null && type != ParameterType.Invalid);

				this.Variable = variable;
				this.Parameter = parameter;
				this.Type = type;
			}
开发者ID:dw4dev,项目名称:Phalanger,代码行数:8,代码来源:Statement.cs


示例18: SerialCommand

        public SerialCommand(string name, ParameterType type)
        {
            Initialize();

            this.nameField = name;
            this.parameterTypeField = type;
            InitialDefault();
        }
开发者ID:yancyn,项目名称:BumbleeBee,代码行数:8,代码来源:SerialCommand.cs


示例19: InterceptedParameter

 public InterceptedParameter(string name, int index, Type type, object value, ParameterType parametertype)
 {
     Name = name;
     Index = index;
     Type = type;
     Value = value;
     ParameterType = parametertype;
 }
开发者ID:Dawn-of-Light,项目名称:Puzzle.NET,代码行数:8,代码来源:ProxyParameter.cs


示例20: Equals

        public override bool Equals(ParameterType other)
        {
            var otherSimple = other as SimpleParameterType;

            if (otherSimple == null)
                return false;

            return this.Name == otherSimple.Name;
        }
开发者ID:joshbtn,项目名称:LINQ-to-Wiki,代码行数:9,代码来源:SimpleParameterType.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ParameterValueOrFieldReference类代码示例发布时间:2022-05-24
下一篇:
C# ParameterSet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap