Updated Branches: refs/heads/master f86eafe09 -> 0905ba09c
first pass wp7 support Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/commit/0905ba09 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/tree/0905ba09 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/diff/0905ba09 Branch: refs/heads/master Commit: 0905ba09c09e07f9dd20b57982b4cae57fe05a76 Parents: f86eafe Author: Benn Mapes <[email protected]> Authored: Wed Jun 12 16:25:01 2013 -0700 Committer: Benn Mapes <[email protected]> Committed: Wed Jun 12 16:25:01 2013 -0700 ---------------------------------------------------------------------- plugin.xml | 11 ++++++++++ src/wp7/DebugConsole.cs | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/0905ba09/plugin.xml ---------------------------------------------------------------------- diff --git a/plugin.xml b/plugin.xml index 626ef04..45760ac 100644 --- a/plugin.xml +++ b/plugin.xml @@ -28,5 +28,16 @@ id="org.apache.cordova.core.console" <source-file src="src/ios/CDVLogger.m" /> </platform> + + <!-- wp7 --> + <platform name="wp7"> + <config-file target="config.xml" parent="/*"> + <feature name="Console"> + <param name="wp-package" value="DebugConsole"/> + </feature> + </config-file> + + <source-file src="src/wp7/DebugConsole.cs" /> + </platform> </plugin> http://git-wip-us.apache.org/repos/asf/cordova-plugin-console/blob/0905ba09/src/wp7/DebugConsole.cs ---------------------------------------------------------------------- diff --git a/src/wp7/DebugConsole.cs b/src/wp7/DebugConsole.cs new file mode 100644 index 0000000..fa9863a --- /dev/null +++ b/src/wp7/DebugConsole.cs @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using System; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using System.Diagnostics; + +namespace WPCordovaClassLib.Cordova.Commands +{ + + public class DebugConsole : BaseCommand + { + // warn, error + public void log(string msg) + { + Debug.WriteLine("Log:" + msg); + } + + public void error(string msg) + { + Debug.WriteLine("Error:" + msg); + } + + public void warn(string msg) + { + Debug.WriteLine("Warn:" + msg); + } + + } +}
