extension methods
扩展方法
2025-10-31 13:04 浏览次数 14
扩展方法
Extension teaching methods推广教学法
Defining Extension Methods定义扩展方法
Declaring extension methods声明扩展方法
extension recognition methods可拓识别方法
extension engineering methods可拓工程方法
Importing extension methods导入扩展方法
Network Extension Methods网络推广方法
virtual extension methods虚拟扩展方法
Extension methods and Curried Delegates扩展方法和扩充委托
In some XSL processors, like Xalan, there are even extension methods written directly into the processor.
在某些XSL处理器中(如xalan),甚至有直接写到处理器中的扩展方法。
Usually, the extension methods are written in the same language as that of the XSL processor.
通常,扩展方法是用和XSL处理器相同的语言编写的。
We「ll likely have one lock for all execution of extension methods, or one lock per extension that all extension methods in that extension share.
可能的做法,就是为所有扩展方法的执行增加一个锁,或者给每个扩展增加一个锁,然后让这个扩展里的所有扩展方法共享。
You can use extension methods to extend a class or interface, but not to override them.
您可以使用扩展方法来扩展一个类或接口,但不是来覆盖。
Extension methods have all the capabilities of regular static methods. In addition, once imported, extension methods can be invoked using instance method syntax.
扩展方法具备所有常规静态方法的所有能力。另外,一旦被导入,扩展方法可以使用实例方法语法调用之。
In addition, once imported, extension methods can be invoked using instance method syntax.
另外,一旦被导入,扩展方法可以使用实例方法语法调用之。
In effect, extension methods make it possible to extend existing types and constructed types with additional methods.
效果上,扩展方法使得用附加的方法扩展已存在类型和构造类型成为可能。
One interesting feature that arises from deferred LINQ extension methods is that queries are evaluated from scratch every time the results are enumerated, as shown in Listing 5-31.
延迟LINQ扩展方法所引起的一个有趣的特性是每次枚举结果时都是从头开始评估的,如清单5 -31所示。
Whether extension methods apply or not depends on the static context of the call (i. e. which using clauses occur), and this context information is not currently kept as part of the payload.
不论扩展方法是否依赖该调用的静态上下文(也就是出现了using语句),因为该上下文信息并不会作为有效载荷的一部分保留下来。
So it」s probably a good idea to keep extension methods isolated to their own namespaces, lest someone get more than they bargained for when they use your namespace.
所以,这可能是一个好主意,让他们自己的命名空间隔离扩展方法,以免有人获得超过他们时,他们使用自己的命名空间讨价还价。
Import Symbol Completion, completes the names of types and extension methods available in the current project; it also automatically adds the appropriate using directives when necessary.
导入符号完成,使在当前项目中完成类型名名称和扩展方法成为可能。它也在需要的时候自动添加适当的using引用。
Is it possible to limit extension methods in a class to be of specific type?
它是可能的限制在一个类是特定类型的扩展方法?
The ADO.NET team will make available a T4 template (not included in Beta) to generate classes and extension methods for ObjectContext.
NET小组会提供t 4模版(没有包含在Beta中)来生成objectcontext的类和扩展方法。