本文整理汇总了C#中Wrapper类的典型用法代码示例。如果您正苦于以下问题:C# Wrapper类的具体用法?C# Wrapper怎么用?C# Wrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Wrapper类属于命名空间,在下文中一共展示了Wrapper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Create
internal static MagickGeometry Create(Wrapper.MagickGeometry value)
{
if (value == null)
return null;
return new MagickGeometry(value);
}
开发者ID:levesque,项目名称:Magick.NET,代码行数:7,代码来源:MagickGeometry.cs
示例2: Create
public static Wrapper Create(object value)
{
Wrapper result = new Wrapper(value);
result.autorelease();
return result;
}
开发者ID:afrog33k,项目名称:mcocoa,代码行数:7,代码来源:Wrapper.cs
示例3: GenerateNewInstanceCode
public CodeExpression GenerateNewInstanceCode (Wrapper.Widget widget)
{
CodeExpression exp = widget.GenerateObjectCreation (this);
CodeExpression var = GenerateInstanceExpression (widget, exp);
GenerateBuildCode (widget, var);
return var;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:GeneratorContext.cs
示例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);
}
开发者ID:fabien-vavrand,项目名称:excel-charting-toolbox,代码行数:7,代码来源:Gradient3ColorsViewModel.cs
示例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);
}
开发者ID:gan3ma,项目名称:Client,代码行数:10,代码来源:GameController.cs
示例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");
}
开发者ID:GeorchW,项目名称:protobuf-net,代码行数:8,代码来源:Issue192.cs
示例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);
}
开发者ID:DarthFubuMVC,项目名称:fubumvc,代码行数:8,代码来源:BehaviorNodeTester.cs
示例8: JTreeStringTemplateModel
public JTreeStringTemplateModel(StringTemplate st)
{
if (st == null)
{
throw new System.ArgumentException("root is null");
}
root = new StringTemplateWrapper(st);
}
开发者ID:david-mcneil,项目名称:stringtemplate,代码行数:8,代码来源:JTreeStringTemplateModel.cs
示例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);
}
开发者ID:KallynGowdy,项目名称:net-feature-tests,代码行数:9,代码来源:6_ConstructorParameterTests.cs
示例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;
}
开发者ID:mono,项目名称:stetic,代码行数:9,代码来源:CodeGenerator.cs
示例12: IsRemoved
static bool IsRemoved(Wrapper wrapper)
{
if (!wrapper.body.IsAdded)
{
wrapper.Dispose();
return true;
}
return false;
}
开发者ID:timdetering,项目名称:Physics2D.Net,代码行数:9,代码来源:LineFluidLogic.cs
示例13: SetUp
public void SetUp()
{
inner = Wrapper.For<SimpleBehavior>();
chain = new BehaviorChain();
chain.AddToEnd(inner);
theNode = new BehaviorTracerNode(inner);
}
开发者ID:jbogard,项目名称:fubumvc,代码行数:9,代码来源:BehaviorTracerNodeTester.cs
示例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);
}
开发者ID:bbehrens,项目名称:fubumvc,代码行数:9,代码来源:BehaviorChainTester.cs
示例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);
}
开发者ID:hartez,项目名称:fubumvc,代码行数:9,代码来源:BehaviorChainTester.cs
示例16: SetUp
public void SetUp()
{
inner = Wrapper.For<SimpleBehavior>();
chain = new BehaviorChain();
chain.AddToEnd(inner);
theNode = new DiagnosticNode(chain);
}
开发者ID:jbogard,项目名称:fubumvc,代码行数:9,代码来源:DiagnosticNodeTester.cs
示例17: 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 objectDef = new BehaviorTracerNode(node).As<IContainerModel>().ToObjectDef();
objectDef.Type.ShouldEqual(typeof(BehaviorTracer));
objectDef.DependencyFor<IActionBehavior>().As<ConfiguredDependency>()
.Definition.Type.ShouldEqual(typeof(SimpleBehavior));
}
开发者ID:joemcbride,项目名称:fubumvc,代码行数:9,代码来源:BehaviorTracer_and_DiagnosticBehavior_construction_testing.cs
示例18: Enqueue
public IAsyncResult Enqueue(object request, AsyncCallback callback, object state)
{
var wrapper = new Wrapper(callback, state);
lock (_items)
{
_items.Add(request, wrapper);
}
return wrapper;
}
开发者ID:2594636985,项目名称:griffin.networking,代码行数:10,代码来源:AsyncJobQueue.cs
示例19: CreateWrapper
public static BaseEvent CreateWrapper(BaseEvent original, Action<BaseEvent, bool> passthrough, bool ignore_delay)
{
ConfigNode cn = new ConfigNode();
original.OnSave(cn);
Wrapper wrapper = new Wrapper(original, passthrough, ignore_delay);
BaseEvent new_event = new BaseEvent(original.listParent, original.name, wrapper.Invoke);
new_event.OnLoad(cn);
return new_event;
}
开发者ID:Eurousalas,项目名称:RemoteTech2,代码行数:10,代码来源:UIPartActionMenuPatcher.cs
示例20: PropertyToDictionaryEntry
public void PropertyToDictionaryEntry(IObjectMapperAdapter mapper)
{
mapper.CreateMap<Wrapper<string>, Dictionary<string, object>>();
var source = new Wrapper<string> { Value = "ABC" };
var result = mapper.Map<Dictionary<string, object>>(source);
Assert.NotNull(result);
Assert.Contains(new KeyValuePair<string, object>("Value", "ABC"), result);
}
开发者ID:KallynGowdy,项目名称:net-feature-tests,代码行数:10,代码来源:8_DictionaryTests.cs
注:本文中的Wrapper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论