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


C# Generator.Find方法代码示例

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


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

示例1: InstantiatorWithElements

		/// <summary>
		/// Gets a delegate that can be used to create instances of a matrix with specified components
		/// </summary>
		/// <returns>The with elements.</returns>
		/// <param name="generator">Generator to create the matrix</param>
		public static Func<float, float, float, float, float, float, IMatrix> InstantiatorWithElements (Generator generator = null)
		{
			var activator = generator.Find<IMatrixHandler> ();
			return (xx, yx, xy, yy, x0, y0) => {
				var matrix = activator ();
				matrix.Create (xx, yx, xy, yy, x0, y0);
				return matrix;
			};
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:14,代码来源:Matrix.cs

示例2: Instantiator

		/// <summary>
		/// Creates a delegate that can be used to create instances of the <see cref="IGraphicsPath"/>
		/// </summary>
		/// <remarks>
		/// This is useful when creating a very large number of graphics path objects
		/// </remarks>
		/// <param name="generator">Generator used to create the graphics path objects</param>
		public static Func<IGraphicsPath> Instantiator (Generator generator = null)
		{
			return generator.Find<IGraphicsPathHandler>();
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:11,代码来源:GraphicsPath.cs

示例3: Instantiator

		/// <summary>
		/// Gets a delegate that can be used to create an identity matrix
		/// </summary>
		/// <param name="generator">Generator to create the matrix</param>
		public static Func<IMatrix> Instantiator (Generator generator = null)
		{
			var activator = generator.Find<IMatrixHandler> ();
			return () => {
				var matrix = activator ();
				matrix.Create ();
				return matrix;
			};
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:13,代码来源:Matrix.cs

示例4: Instantiator

		/// <summary>
		/// Creates a delegate that can be used to create instances of the <see cref="IGraphicsPath"/>
		/// </summary>
		/// <remarks>
		/// This is useful when creating a very large number of graphics path objects
		/// </remarks>
		/// <param name="generator">Generator used to create the graphics path objects</param>
		public static Func<IGraphicsPath> Instantiator (Generator generator = null)
		{
			var instantiator = generator.Find<IGraphicsPathHandler> ();
			return () => {
				return instantiator ();
			};
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:14,代码来源:GraphicsPath.cs


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