本文整理汇总了C#中Wrapper类的典型用法代码示例。如果您正苦于以下问题:C# Wrapper类的具体用法?C# Wrapper怎么用?C# Wrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Wrapper类属于命名空间,在下文中一共展示了Wrapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
internal static MagickGeometry Create(Wrapper.MagickGeometry value)
{
if (value == null)
return null;
return new MagickGeometry(value);
}
示例2: Create
public static Wrapper Create(object value)
{
Wrapper result = new Wrapper(value);
result.autorelease();
return result;
}
示例3: GenerateNewInstanceCode
public CodeExpression GenerateNewInstanceCode (Wrapper.Widget widget)
{
CodeExpression exp = widget.GenerateObjectCreation (this);
CodeExpression var = GenerateInstanceExpression (widget, exp);
GenerateBuildCode (widget, var);
return var;
}
示例4: Gradient3ColorsViewModel
public Gradient3ColorsViewModel()
{
Func<object, Tuple<bool, double>> converter = (o) => Tuple.Create(o.IsDouble(), o.ToDouble());
LowValue = new Wrapper<double>(converter);
MidValue = new Wrapper<double>(converter);
HighValue = new Wrapper<double>(converter);
}
示例5: Start
//Dictionary<string, string> p = new Dictionary<string, string>{ {"name" , "gan3ma2"} , {"room_no" , "252"} };
//Dictionary<string, string> t = new Dictionary<string, string>{ {"play_id" , "7"} , {"user_id" , "38"}};
// Use this for initialization
void Start()
{
W = GameObject.Find ("Wrapper").GetComponent<Wrapper> ();
//p ["name"] = "gan3ma";
url = "http://192.168.3.83:3000/plays/7/pieces";
W.GET (url);
}
示例6: SerializeWrappedDeepList
public void SerializeWrappedDeepList()
{
Program.ExpectFailure<NotSupportedException>(() =>
{
var wrapped = new Wrapper();
var clone = Serializer.DeepClone(wrapped);
}, "Nested or jagged lists and arrays are not supported");
}
示例7: SetUp
public void SetUp()
{
node1 = new Wrapper(typeof(FakeJsonBehavior));
node2 = new Wrapper(typeof(FakeJsonBehavior));
node3 = new Wrapper(typeof(FakeJsonBehavior));
node1.AddToEnd(node2);
node1.AddToEnd(node3);
}
示例8: JTreeStringTemplateModel
public JTreeStringTemplateModel(StringTemplate st)
{
if (st == null)
{
throw new System.ArgumentException("root is null");
}
root = new StringTemplateWrapper(st);
}
示例9: creating_an_object_def_for_full_tracing_should_wrap_with_a_behavior_tracer
public void creating_an_object_def_for_full_tracing_should_wrap_with_a_behavior_tracer()
{
var node = new Wrapper(typeof (SimpleBehavior));
var instance = new BehaviorTracerNode(node).As<IContainerModel>().ToInstance().As<IConfiguredInstance>();
instance.PluggedType.ShouldBe(typeof (BehaviorTracer));
instance.FindDependencyDefinitionFor<IActionBehavior>()
.ReturnedType.ShouldBe(typeof (SimpleBehavior));
}
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:9,代码来源:BehaviorTracer_and_DiagnosticBehavior_construction_testing.cs
示例10: Simple
public void Simple(IObjectMapperAdapter mapper)
{
mapper.CreateMap<Wrapper<string>, ImmutableWrapper<string>>();
var source = new Wrapper<string> { Value = "X" };
var result = mapper.Map<ImmutableWrapper<string>>(source);
Assert.Equal("X", result.Value);
}
示例11: GenerateCreationCode
public static WidgetMap GenerateCreationCode(CodeNamespace cns, CodeTypeDeclaration type, Wrapper.ActionGroup grp, CodeExpression groupVarExp, CodeStatementCollection statements, GenerationOptions options, ArrayList warnings)
{
statements.Add (new CodeCommentStatement ("Action group " + grp.Name));
GeneratorContext ctx = new ProjectGeneratorContext (cns, type, statements, options);
ctx.GenerateCreationCode (grp, groupVarExp);
ctx.EndGeneration ();
warnings.AddRange (ctx.Warnings);
return ctx.WidgetMap;
}
示例12: IsRemoved
static bool IsRemoved(Wrapper wrapper)
{
if (!wrapper.body.IsAdded)
{
wrapper.Dispose();
return true;
}
return false;
}
示例13: SetUp
public void SetUp()
{
inner = Wrapper.For<SimpleBehavior>();
chain = new BehaviorChain();
chain.AddToEnd(inner);
theNode = new BehaviorTracerNode(inner);
}
示例14: append_with_no_behaviors
public void append_with_no_behaviors()
{
var chain = new BehaviorChain();
var wrapper = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
chain.Append(wrapper);
chain.Top.ShouldBeTheSameAs(wrapper);
}
示例15: adding_a_node_to_the_end_sets_the_chain_on_the_node
public void adding_a_node_to_the_end_sets_the_chain_on_the_node()
{
var chain = new BehaviorChain();
var wrapper = new Wrapper(typeof(ObjectDefInstanceTester.FakeJsonBehavior));
chain.AddToEnd(wrapper);
wrapper.ParentChain().ShouldBeTheSameAs(chain);
}