internal static string GetPropertiesAsObservables(IBindableToJs javaScript)
        {
            var observableProperties = javaScript.GetType().GetProperties().Where(IsObservableWeSupport);

            var observableDefinitions = Enumerable.Select(observableProperties, x => CreateObservableFunction(x.Name, javaScript.Name));

            return String.Join(Environment.NewLine, observableDefinitions);
        }
示例#2
0
        internal static string GetPropertiesAsObservables(IBindableToJs javaScript)
        {
            var observableProperties = javaScript.GetType().GetProperties().Where(IsObservableWeSupport);

            var observableDefinitions = Enumerable.Select(observableProperties, x => CreateObservableFunction(x.Name, javaScript.Name));

            return(String.Join(Environment.NewLine, observableDefinitions));
        }
        internal static string GetCollectionsAsObservables(IBindableToJs viewModel)
        {
            var observableCollections = viewModel.GetType().ObservableCollectionProperties();

            var observableArrays = observableCollections.Select(info => CreateObservableArrayWithListener(info.Name, viewModel.Name, info.GetValue(viewModel, null))).ToList();

            return String.Join(Environment.NewLine, observableArrays);
        }
示例#4
0
        internal static string GetCollectionsAsObservables(IBindableToJs viewModel)
        {
            var observableCollections = viewModel.GetType().ObservableCollectionProperties();

            var observableArrays = observableCollections.Select(info => CreateObservableArrayWithListener(info.Name, viewModel.Name, info.GetValue(viewModel, null))).ToList();

            return(String.Join(Environment.NewLine, observableArrays));
        }
        internal static string GetMethodProxies(IBindableToJs toBind)
        {
            var methodInfos = toBind.GetType().GetMethods().Where(IsReturnTypeWeSupport);

            return(String.Join(Environment.NewLine, methodInfos.Select(info => CreateMethodProxy(toBind.Name, info.Name))));
        }
        internal static string GetMethodProxies(IBindableToJs toBind)
        {
            var methodInfos = toBind.GetType().GetMethods().Where(IsReturnTypeWeSupport);

            return String.Join(Environment.NewLine, methodInfos.Select(info => CreateMethodProxy(toBind.Name, info.Name)));
        }