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


C# Value.getType方法代码示例

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


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

示例1: assign

 public void assign(java.lang.Object par0, Value par1)
 {
     java.lang.Object obj = lookup(par0);
     if (obj is Variable)
     {
         Variable var = (Variable)obj;
         var.setValue(session, par1.getType(), par1.getValueAsString());
         return;
     }
     throw new NotImplementedException();
 }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:11,代码来源:ExpressionContext.cs

示例2: assign

 public void assign(Object par0, Value par1)
 {
     Variable var = lookup(par0) as Variable;
     if (var != null)
     {
         int type = var.getValue().getType();
         if (type == VariableType_.BOOLEAN || type == VariableType_.NUMBER || type == VariableType_.STRING)
             var.setValue(session, par1.getType(), par1.getValueAsString());
         else
             throw new NotSupportedException(TextHelper.GetString("Error.NoScalar"));
     } 
     else
         throw new NoSuchVariableException(System.String.Format(TextHelper.GetString("Error.NoSuchVariable"), par0));
 }
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:14,代码来源:ExpressionContext.cs

示例3: FormatValue

        public java.lang.String FormatValue(Value val)
        {
            java.lang.String ret = "";
            if (val == null) return "null";
			int type = val.getType();
            if (type == VariableType_.MOVIECLIP || type == VariableType_.OBJECT)
            {
                ret = val.getTypeName();
            }
            else
            {
                ret = val.getValueAsString();
            }
            return ret;
        }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:15,代码来源:ExpressionContext.cs

示例4: GetInstance

 /// <summary>
 /// This creates a <c>Map</c> object instance from the type
 /// provided. If the type provided is abstract or an interface then
 /// this can promote the type to a map object type that can be
 /// instantiated. This is done by asking the type to convert itself.
 /// </summary>
 /// <param name="value">
 /// the type used to instantiate the map object
 /// </param>
 /// <returns>
 /// this returns a compatible map object instance
 /// </returns>
 public Instance GetInstance(Value value) {
    Class type = value.getType();
    if(!isInstantiable(type)) {
       type = GetConversion(type);
    }
    if(!IsMap(type)) {
       throw new InstantiationException("Type is not a map %s", type);
    }
    return new ConversionInstance(context, value, type);
 }
开发者ID:ngallagher,项目名称:simplexml,代码行数:22,代码来源:MapFactory.cs


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