boo

How can i use Extension Methods in boo

帅比萌擦擦* 提交于 2019-12-05 21:26:00
I have a list in my boo script and want to use System.Linq Extension Methods but boo compiler throw this Exception: BCE0019: Boo.Lang.Compiler.CompilerError: 'ToList' is not a member of 'System.Linq.IQueryable`1[[...]]'. ("..." is type of my object) What version of Boo? Extension Methods have been supported since 0.9.0. If you can't use extension methods with the version you are using, you'll have to use absolute method calls, e.g. Enumerable.Select(...). As @Jean has said, have you also imported System.Linq ? I should import System.Linq.Enumerable not System.Linq thanks Jean and Matthew for

Multithreaded Script invocation in Unity3d

ε祈祈猫儿з 提交于 2019-12-05 20:42:08
I was trying to implement multithreaded script execution in Unity3d, but it seems that the there is no way provided by Unity libraries and we have to use System.Threading provided by Mono. But they have mentioned that Unity Scripting is not thread safe. Can i implement Multithreading safely and efficiently in Unity3D using System.threading or other Platform independent API ? Also how can i make sure that the scripts are running in parallel ? An example or a link would be highly appreciated. Regards I needed threading for an iOS application, unfortunately I never found a way to do such in Unity

What is a real-world application for HORN?

对着背影说爱祢 提交于 2019-12-04 13:15:51
I've been hearing a bit about HORN lately, and wonder what problems it can solve or how a real life situation of using it is beneficial. http://code.google.com/p/hornget/ I have written most of the code for horn and the objective is to be a package manager with an analogy with rubygems. We want to up OSS adoption by making it ridiculously obvious to get and use OSS packages. For example if I want Nhibernate we can simply command: horn -install:nhibernate etc. We also want to smooth the upgrade path. A lot of .NET OSS uses other OSS and they generally all have differing version of oss. For

BOO Vs IronPython

爱⌒轻易说出口 提交于 2019-12-04 10:11:37
问题 What is the difference between IronPython and BOO? Is there a need for 2 Python-like languages? 回答1: IronPython is designed to be a faithful implementation of Python on the .NET platform. Version 1 targets Python 2.4 for compatibility, and version 2 targets version 2.5 (although most of the Python standard library modules implemented in C aren't supported). Boo's stated aim is to be a "wrist-friendly [dynamic] language for the CLI." It takes a lot of inspiration from Python, but diverges on

Generate custom setter using attributes

北战南征 提交于 2019-12-04 08:12:45
In classes whose instances I persist using an object database, I keep having to do this: private string _name; public string Name { get { return this._name; } set { _name = value; this.Save(); } } whereas I would much rather type this: [PersistedProperty(Name)] private string _name; where the PersistedProperty attributes generates a Getter and Setter just like the default [Property()] attribute, except I want to add a line of code to the generated Setter. Is there a way I can create an attribute which does this? Hopefully , which works with Intellisense. How does the default [Property()]

BOO Vs IronPython

跟風遠走 提交于 2019-12-03 05:10:38
What is the difference between IronPython and BOO ? Is there a need for 2 Python-like languages? IronPython is designed to be a faithful implementation of Python on the .NET platform. Version 1 targets Python 2.4 for compatibility, and version 2 targets version 2.5 (although most of the Python standard library modules implemented in C aren't supported). Boo 's stated aim is to be a "wrist-friendly [dynamic] language for the CLI." It takes a lot of inspiration from Python, but diverges on four main points: It's designed specifically to take good advantage of the .NET platform The designer

.NET Nested Classes

非 Y 不嫁゛ 提交于 2019-12-02 13:53:40
问题 The current class library I am working on will have a base class (Field) with over 50 specific "field" types which will inherit from "Field" and nested for maintain readability. For example... abstract class Field { public int Length { get; set; } public class FieldA : Field { public static void DoSomething() { Console.WriteLine("Did something."); } } } So far everything looks good and I can use the code as shown: class Program { static void Main(string[] args) { Field.FieldA.DoSomething(); }

Spring Boot 1 和 Spring Boo 2的差别

こ雲淡風輕ζ 提交于 2019-12-02 07:51:05
有差别,但差别不大。基本上基于SpringBoot的代码不需要改动,但有些配置属性和配置类,可能要改动,改动原因是 配置已经不存在或者改名 类已经不存在改名 听着挺吓人,但我实际切换过程中改动的地方很少。一般正常的MVC,数据库访问这些都不需要改动,下面按照我写的 《Spring Boot 2精髓:从构建小系统到架构分布式大系统》 本书章节说明我曾碰到的区别 第1章,SpringBoot 2基于Spring5和JDK8,而Spring 1x则用的是JDK7,因此你的应用服务必须支持JDK8 第2章,无区别,使用SpringBoo2,建议使用较新的Maven版本,以及较新的JDK,尤其是IDE工具,以免Maven在IDE里的视图报出警告信息 第3章:MVC部分,有些定制类改动了,比如WebMvcConfiguer,由抽象类改为接口,这是因为JDK8对接口有新的支持形式,3.8章提到的统一错误处理,基类AbstarctErrorController也改动非常大,请参考书中描述的知识点。MVC里的视图渲染Freemaker视图解析器也有改动,默认情况下,它会自动加上ftl来来寻找模板 第4章:关于Beetl,无改动,请使用新版本即可 第5章,无改动,JDBCTemplate和BeetlSQL均可以使用 第6章,JPA中,findById 返回了一个Optional对象,改动较大

.NET Nested Classes

自古美人都是妖i 提交于 2019-12-02 05:32:47
The current class library I am working on will have a base class (Field) with over 50 specific "field" types which will inherit from "Field" and nested for maintain readability. For example... abstract class Field { public int Length { get; set; } public class FieldA : Field { public static void DoSomething() { Console.WriteLine("Did something."); } } } So far everything looks good and I can use the code as shown: class Program { static void Main(string[] args) { Field.FieldA.DoSomething(); } } However, why does this work as well? What is going on here that allows the compiler / IDE

Is it possible to save a dynamic assembly to disk?

不打扰是莪最后的温柔 提交于 2019-12-01 03:23:18
I recently bought Ayende's book Building DSLs in Boo (buy it, read it, it's awesome) but I'm coming up against an implementation problem and I want to see what the generated code looks like. I would normally use reflector to look at the code but in this case the assemblies are dynamic and only in memory. Is there a way to save dynamic assemblies to disk so that I can reflect them? EDIT / My Answer : Wow, it took awhile to come back to this one. Unfortunately I left an important bit out from the original question. Important Bit: I'm using Ayende's RhinoDSL library as he recommends in the book.