From 7e573c45696f115e883aa829000c5b238714cadc Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sun, 2 Mar 2014 16:50:37 +0100 Subject: [PATCH] Windows Phone 8 .NET: jsonrpc4net Logging does not seem to work on Windows Phone :/ It seems like HttpClient is not working in async way. What is wrong with my implementation? --- .../Connect4MonoGame/Connect4MonoGame.csproj | 12 +- .../Connect4MonoGame/Content/blupiece.png | Bin 0 -> 1848 bytes .../Connect4MonoGame/Content/redpiece.png | Bin 0 -> 1825 bytes .../Connect4MonoGame/Connect4MonoGame/Game1.cs | 11 +- .../RemoteAgents/RemoteAgents/MainPage.xaml.cs | 19 +- .../RemoteAgents/Model/CallRemoteProcedure.cs | 109 - WindowsPhone/RemoteAgents/RemoteAgents/NLog.config | 26 + WindowsPhone/RemoteAgents/RemoteAgents/NLog.xsd | 2638 ++++++++++++++++++++ .../RemoteAgents/RemoteAgents/RemoteAgents.csproj | 26 +- .../RemoteAgents/RemoteAgents/View/View.cs | 4 +- .../RemoteAgents/ViewModel/ViewModel.cs | 6 +- .../RemoteAgents/RemoteAgents/packages.config | 3 + WindowsPhone/jsonrpc4net/jsonrpc4net.sln | 34 + .../jsonrpc4net/jsonrpc4net/ExceptionResolver.cs | 65 + .../jsonrpc4net/JsonRpcClientException.cs | 49 + .../jsonrpc4net/JsonRpcHttpAsyncClient.cs | 155 ++ .../jsonrpc4net/Properties/AssemblyInfo.cs | 37 + .../jsonrpc4net/jsonrpc4net/jsonrpc4net.csproj | 129 + .../jsonrpc4net/jsonrpc4net/packages.config | 8 + 19 files changed, 3184 insertions(+), 147 deletions(-) create mode 100644 WindowsPhone/Connect4MonoGame/Connect4MonoGame/Content/blupiece.png create mode 100644 WindowsPhone/Connect4MonoGame/Connect4MonoGame/Content/redpiece.png delete mode 100644 WindowsPhone/RemoteAgents/RemoteAgents/Model/CallRemoteProcedure.cs create mode 100644 WindowsPhone/RemoteAgents/RemoteAgents/NLog.config create mode 100644 WindowsPhone/RemoteAgents/RemoteAgents/NLog.xsd create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net.sln create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net/ExceptionResolver.cs create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net/JsonRpcClientException.cs create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net/JsonRpcHttpAsyncClient.cs create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net/Properties/AssemblyInfo.cs create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net/jsonrpc4net.csproj create mode 100644 WindowsPhone/jsonrpc4net/jsonrpc4net/packages.config diff --git a/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Connect4MonoGame.csproj b/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Connect4MonoGame.csproj index 5db24eb..eef48a4 100644 --- a/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Connect4MonoGame.csproj +++ b/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Connect4MonoGame.csproj @@ -120,6 +120,8 @@ PreserveNewest + + @@ -129,13 +131,13 @@ - - $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\WindowsPhone\ARM\MonoGame.Framework.dll - - - $(MSBuildExtensionsPath)\..\MonoGame\v3.0\Assemblies\WindowsPhone\x86\MonoGame.Framework.dll + + False + ..\..\..\..\MonoGame\MonoGame.Framework\bin\WindowsPhone\x86\Debug\MonoGame.Framework.dll + False + diff --git a/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Content/blupiece.png b/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Content/blupiece.png new file mode 100644 index 0000000000000000000000000000000000000000..4564d4c850a759e72c0811bcc321da54e63b56e3 GIT binary patch literal 1848 zcmV-82gmq{P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf2F*!CK~!i%?b!QI zlV=nM@cmy)mN;W{x=f>S(ded|)6J+;l#9qk5L!xUZMn3iP{0BOluezRI?TLmbKc^@ zMU>J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10HUowbiqr2lEzjJ#10U%DVl}fA;KBA&U z2T*wGQ@QOBfD%E#NG(7p5J0U|Vnhxd5CaGf4ED&0t|Sm+d+Ev89&)wpq+hFd&~G&r zVgRjFBFN;#3o{T_Ef1gKN&)frzA;+l*Bmx0{Zh4EtbkT30R&Q4H*$S5HbOpb*h&HM zeE&Fwc^|pM?|-A>qc{k>QprKMw+fC9i{)0(ZY>D}(#p$!hg1T{jmq+*5KvMOOdfYn zf&OmNxY)I>R=M>kCdBgt`)OflfbLn%^m9cSTL*!YDJck~@&1A9OpF49J1MS}VnI9| zAB{)jryT&%Vc=v+4bsz2L0qCSNRTIiE)>@_#eh)JxZ7Y72$fcNoJuJ{AiyB400a;m zbO5uK5dR!JKui3(tF2j9r{$5r<5bEB0ssYp^a|Q6YYL$X9J}}OXrzOH(t0{hiQ5o#wfR6mS%E+*60q#_u+=12Huy>)!W}9=vVnNUODhT* zyEYm^?A$19)Pp|x+#sN=K_CUmMd=%B|y0N(+3D5ai1dw5Zpll0_me5up(i9P%uaJH4V#M| P00000NkvXXu0mjf0i!jM literal 0 HcmV?d00001 diff --git a/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Game1.cs b/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Game1.cs index ac0bc4f..0dce598 100644 --- a/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Game1.cs +++ b/WindowsPhone/Connect4MonoGame/Connect4MonoGame/Game1.cs @@ -42,8 +42,10 @@ namespace Connect4MonoGame { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); - - + + //texture = new Texture2D(_spriteBatch.GraphicsDevice, 1, 1); + //texture.SetData(new Color[] { Color.Yellow }); + texture = Content.Load("redpiece.png"); // TODO: use this.Content to load your game content here @@ -80,11 +82,6 @@ namespace Connect4MonoGame // TODO: Add your drawing code here _spriteBatch.Begin(); - if (texture == null) - { - texture = new Texture2D(_spriteBatch.GraphicsDevice, 1, 1); - texture.SetData(new Color[] { Color.Yellow }); - } _spriteBatch.Draw(texture, new Rectangle(120, 120, 300, 300), Color.Yellow); _spriteBatch.End(); base.Draw(gameTime); diff --git a/WindowsPhone/RemoteAgents/RemoteAgents/MainPage.xaml.cs b/WindowsPhone/RemoteAgents/RemoteAgents/MainPage.xaml.cs index 449a27a..8c692cc 100644 --- a/WindowsPhone/RemoteAgents/RemoteAgents/MainPage.xaml.cs +++ b/WindowsPhone/RemoteAgents/RemoteAgents/MainPage.xaml.cs @@ -9,17 +9,23 @@ using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; using Example.RemoteAgents.WindowsPhone.Resources; using RemoteAgents.WindowsPhone.View; +using NLog; namespace RemoteAgents { public partial class MainPage : PhoneApplicationPage { - private readonly ViewImpl view; + private readonly ViewImpl _view; + + /// + /// The logger. + /// + private static readonly Logger _logger = LogManager.GetCurrentClassLogger(); // Constructor public MainPage() { - view = new ViewImpl(); + _view = new ViewImpl(); InitializeComponent(); @@ -32,16 +38,11 @@ namespace RemoteAgents { try { - string currentDate = await view.GetCurrentDateAsync(); - if (currentDate != null) - { - this.CurrentDateTextBox.Text = currentDate; - } + this.CurrentDateTextBox.Text = await _view.GetCurrentDateAsync(); } catch (Exception exception) { - //TODO: logger for Windows Phone 8 :( - Console.WriteLine("ButtonGetDateClicked. Message: {0} Stacktrace: {1}", exception.Message, exception.StackTrace); + _logger.Error("ButtonGetDateClicked. Message: {0} Stacktrace: {1}", exception.Message, exception.StackTrace); } } diff --git a/WindowsPhone/RemoteAgents/RemoteAgents/Model/CallRemoteProcedure.cs b/WindowsPhone/RemoteAgents/RemoteAgents/Model/CallRemoteProcedure.cs deleted file mode 100644 index 4b3f119..0000000 --- a/WindowsPhone/RemoteAgents/RemoteAgents/Model/CallRemoteProcedure.cs +++ /dev/null @@ -1,109 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using System; -using System.Net; -using System.Net.Http; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace RemoteAgents.WindowsPhone.Model -{ - public class CallRemoteProcedure - { - - async public Task CallPostRemoteServiceAsync(string uri, string method) - { - POSTResult postResult = null; - - postResult = await this.PostAsync(uri, method, CancellationToken.None); - - return postResult.result; - } - - async private Task> PostAsync(string uri, string method, CancellationToken cancellation) - { - var postData = new POST(); - postData.id = "2114567586433855105"; - postData.jsonrpc = "2.0"; - postData.method = method; - var jsonSettings = new JsonSerializerSettings - { - Error = delegate(object sender, ErrorEventArgs args) - { - //TODO: logger for Windows Phone 8 :( - Console.WriteLine(args.ErrorContext.Error.Message); - args.ErrorContext.Handled = true; - } - }; - - string data = JsonConvert.SerializeObject(postData, jsonSettings); - - // see: http://stackoverflow.com/questions/1329739/nested-using-statements-in-c-sharp - // see: http://stackoverflow.com/questions/5895879/when-do-we-need-to-call-dispose-in-dot-net-c - //TODO: Am I really sure I have to call the Dispose method of HttpContent content. In this case shouldn't it be stupid? - // for HttpResponseMessage response I am sure I have to do it but I am not for HttpContent content. - using (HttpContent content = new StringContent(data, System.Text.Encoding.UTF8, "application/json-rpc")) - using (HttpResponseMessage response = await this.PostAsync(uri, content, cancellation)) - { - POSTResult postResult = null; - - if (response.StatusCode == HttpStatusCode.OK) - { - byte[] responseBytes = await response.Content.ReadAsByteArrayAsync(); - string responseString = Encoding.UTF8.GetString(responseBytes, 0, responseBytes.Length); - postResult = JsonConvert.DeserializeObject>(responseString, jsonSettings); - } - - return postResult; - } - } - - - /// - /// Send a POST request to the specified Uri as an asynchronous operation. - /// - /// The Uri the request is sent to. - /// The HTTP request content sent to the server. - /// Cancellation token. - /// When some error. - /// System.Threading.Tasks.Task]]>.The task object representing the asynchronous operation. - async private Task PostAsync(string uri, HttpContent content, CancellationToken cancellation) - { - using (HttpClient client = new HttpClient() { Timeout = TimeSpan.FromSeconds(5) }) - { - return await client.PostAsync(uri, content, cancellation); - } - } - - private class POST - { - public string id { get; set; } - public string jsonrpc { get; set; } - public string method { get; set; } - } - - - private class POSTResult - { - public string id { get; set; } - public string jsonrpc { get; set; } - public TResult result { get; set; } - } - - // TODO: When error I receive from JSONRPC: {"jsonrpc":"2.0","id":"null","error":{"code":-32600,"message":"Invalid Request"}} - private class Error - { - public int code { get; set; } - public string message { get; set; } - } - - private class ERRORResult - { - public string jsonrpc { get; set; } - public string id { get; set; } - public Error error { get; set; } - } - } - -} diff --git a/WindowsPhone/RemoteAgents/RemoteAgents/NLog.config b/WindowsPhone/RemoteAgents/RemoteAgents/NLog.config new file mode 100644 index 0000000..ffa252c --- /dev/null +++ b/WindowsPhone/RemoteAgents/RemoteAgents/NLog.config @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WindowsPhone/RemoteAgents/RemoteAgents/NLog.xsd b/WindowsPhone/RemoteAgents/RemoteAgents/NLog.xsd new file mode 100644 index 0000000..49dd620 --- /dev/null +++ b/WindowsPhone/RemoteAgents/RemoteAgents/NLog.xsd @@ -0,0 +1,2638 @@ + + + + + + + + + + + + + + Watch config file for changes and reload automatically. + + + + + Print internal NLog messages to the console. Default value is: false + + + + + Print internal NLog messages to the console error output. Default value is: false + + + + + Write internal NLog messages to the specified file. + + + + + Log level threshold for internal log messages. Default value is: Info. + + + + + Global log level threshold for application log messages. Messages below this level won't be logged.. + + + + + Pass NLog internal exceptions to the application. Default value is: false. + + + + + + + + + + + + + + Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes). + + + + + + + + + + + + + + + + + Prefix for targets/layout renderers/filters/conditions loaded from this assembly. + + + + + Load NLog extensions from the specified file (*.dll) + + + + + Load NLog extensions from the specified assembly. Assembly name should be fully qualified. + + + + + + + + + + Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name* + + + + + Comma separated list of levels that this rule matches. + + + + + Minimum level that this rule matches. + + + + + Maximum level that this rule matches. + + + + + Level that this rule matches. + + + + + Comma separated list of target names. + + + + + Ignore further rules if this one matches. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the file to be included. The name is relative to the name of the current config file. + + + + + Ignore any errors in the include file. + + + + + + + Variable name. + + + + + Variable value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether buffer should grow as needed. + + + + + Number of log events to be buffered. + + + + + Maximum number of log events that the buffer can keep. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to add <!-- --> comments around all written texts. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Limit on the number of requests in the lazy writer thread request queue. + + + + + Time in milliseconds to sleep between batches. + + + + + Number of log events that should be processed in a batch by the lazy writer thread. + + + + + Action to be taken when the lazy writer thread request queue count exceeds the set limit. + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to use sliding timeout. + + + + + Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. + + + + + Number of log events to be buffered. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. + + + + + Encoding to be used. + + + + + Instance of that is used to format log messages. + + + + + Network address. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Indicates whether to keep connection open whenever possible. + + + + + Maximum queue size. + + + + + Indicates whether to include dictionary contents. + + + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + + + + AppInfo field. By default it's the friendly name of the current AppDomain. + + + + + Indicates whether to include NLog-specific extensions to log4j schema. + + + + + Indicates whether to include stack contents. + + + + + NDC item separator. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + + + + + + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Viewer parameter name. + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Footer. + + + + + Header. + + + + + Text to be rendered. + + + + + Indicates whether to use default row highlighting rules. + + + + + Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Condition that must be met in order to set the specified foreground and background color. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Background color. + + + + + Foreground color. + + + + + + + + + + + + + + + + Name of the target. + + + + + Footer. + + + + + Header. + + + + + Text to be rendered. + + + + + Indicates whether to send the log messages to the standard error instead of the standard output. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. + + + + + Name of the database provider. + + + + + Indicates whether to use database transactions. Some data providers require this. + + + + + Indicates whether to keep the database connection open between the log events. + + + + + Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. + + + + + Name of the connection string (as specified in <connectionStrings> configuration section. + + + + + Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. + + + + + Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + + + + + Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. + + + + + Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + + + + + Text of the SQL command to be run on each log level. + + + + + + + + + + + + + + + + + + + + + + + Type of the command. + + + + + Connection string to run the command against. If not provided, connection string from the target is used. + + + + + Indicates whether to ignore failures. + + + + + Command text. + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Database parameter name. + + + + + Database parameter precision. + + + + + Database parameter scale. + + + + + Database parameter size. + + + + + + + + + + + + + + + Name of the target. + + + + + Footer. + + + + + Header. + + + + + Text to be rendered. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Name of the machine on which Event Log service is running. + + + + + Value to be used as the event Source. + + + + + Name of the Event Log to write to. This can be System, Application or any user-defined name. + + + + + Layout that renders event Category. + + + + + Layout that renders event ID. + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to return to the first target after any successful write. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + File encoding. + + + + + Line ending mode. + + + + + Footer. + + + + + Text to be rendered. + + + + + Header. + + + + + Indicates whether to automatically archive log files every time the specified time passes. + + + + + Size in bytes above which log files will be automatically archived. + + + + + Name of the file to be used for an archive. + + + + + Maximum number of archive files that should be kept. + + + + + Way file archives are numbered. + + + + + Gets ors set a value indicating whether a managed file stream is forced, instead of used the native implementation. + + + + + File attributes (Windows only). + + + + + Indicates whether to delete old log file on startup. + + + + + Indicates whether to enable log file(s) to be deleted. + + + + + Indicates whether to create directories if they don't exist. + + + + + Indicates whether to replace file contents on each write instead of appending log message at the end. + + + + + Name of the file to write to. + + + + + Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. + + + + + Log file buffer size in bytes. + + + + + Number of times the write is appended on the file before NLog discards the log message. + + + + + Delay in milliseconds to wait before attempting to write to the file again. + + + + + Indicates whether to automatically flush the file buffers after each log message. + + + + + Indicates whether concurrent writes to the log file by multiple processes on the same host. + + + + + Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + + + + + Indicates whether concurrent writes to the log file by multiple processes on different network hosts. + + + + + Indicates whether to keep log file open instead of opening and closing it on each logging event. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Condition expression. Log events who meet this condition will be forwarded to the wrapped target. + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Name of the Form on which the control is located. + + + + + Name of control to which NLog will log write log text. + + + + + Indicates whether log text should be appended to the text of the control instead of overwriting it. + + + + + Whether new log entry are added to the start or the end of the control + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + User account password. + + + + + Indicates whether to revert to the credentials of the process instead of impersonating another user. + + + + + Username to change context to. + + + + + Logon Type. + + + + + Windows domain name to change context to. + + + + + Required impersonation level. + + + + + Type of the logon provider. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Name of the endpoint configuration in WCF configuration file. + + + + + Endpoint address. + + + + + Indicates whether to use binary message encoding. + + + + + Client ID. + + + + + Indicates whether to include per-event properties in the payload sent to the server. + + + + + + + + + + + + + + Layout that should be use to calcuate the value for the parameter. + + + + + Name of the parameter. + + + + + Type of the parameter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to send message as HTML instead of plain text. + + + + + Encoding to be used for sending e-mail. + + + + + Indicates whether to add new lines between log entries. + + + + + Text to be rendered. + + + + + Header. + + + + + Footer. + + + + + Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). + + + + + Mail subject. + + + + + Mail message body (repeated for each log message send in one mail). + + + + + Sender's email address (e.g. joe@domain.com). + + + + + Indicates whether NewLine characters in the body should be replaced with tags. + + + + + Priority used for sending mails. + + + + + Indicates whether the default Settings from System.Net.MailSettings should be used. + + + + + SMTP Server to be used for sending. + + + + + Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Port number that SMTP Server is listening on. + + + + + SMTP Authentication mode. + + + + + Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). + + + + + Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Message box title. + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to use the XML format when serializing message. This will also disable creating queues. + + + + + Indicates whether to check if a queue exists before writing to it. + + + + + Layout used to format log messages. + + + + + Encoding to be used when writing text to the queue. + + + + + Name of the queue to write to. + + + + + Indicates whether to use recoverable messages (with guaranteed delivery). + + + + + Indicates whether to create the queue if it doesn't exists. + + + + + Label to associate with each message. + + + + + + + + + + + + + + + + + Name of the target. + + + + + Method name. The method must be public and static. + + + + + Class name. + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. + + + + + Layout used to format log messages. + + + + + Encoding to be used. + + + + + Indicates whether to keep connection open whenever possible. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Network address. + + + + + Maximum queue size. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to append newline at the end of log message. + + + + + Action that should be taken if the message is larger than maxMessageSize. + + + + + Maximum message size in bytes. + + + + + Encoding to be used. + + + + + Instance of that is used to format log messages. + + + + + Network address. + + + + + Size of the connection cache (number of connections which are kept alive). + + + + + Indicates whether to keep connection open whenever possible. + + + + + Maximum queue size. + + + + + Indicates whether to include dictionary contents. + + + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + + + + AppInfo field. By default it's the friendly name of the current AppDomain. + + + + + Indicates whether to include NLog-specific extensions to log4j schema. + + + + + Indicates whether to include stack contents. + + + + + NDC item separator. + + + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + + + + + + + + + + + + + + + Name of the target. + + + + + Indicates whether to perform layout calculation. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Name of the performance counter. + + + + + Performance counter type. + + + + + Performance counter instance name. + + + + + Indicates whether performance counter should be automatically created. + + + + + Name of the performance counter category. + + + + + Counter help text. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Default filter to be applied when no specific rule matches. + + + + + + + + + + + + + Condition to be tested. + + + + + Resulting filter to be applied when the condition matches. + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + Name of the target. + + + + + Number of times to repeat each log message. + + + + + + + + + + + + + + + + Name of the target. + + + + + Time to wait between retries in milliseconds. + + + + + Number of retries that should be attempted on the wrapped target in case of a failure. + + + + + + + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + Indicates whether the created form will be initially minimized. + + + + + Maximum number of lines the rich text box will store (or 0 to disable this feature). + + + + + Initial width of the form with rich text box. + + + + + Indicates whether the created window will be a tool window. + + + + + Name of RichTextBox to which Nlog will write. + + + + + Indicates whether scroll bar will be moved automatically to show most recent log entries. + + + + + Initial height of the form with rich text box. + + + + + Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one. + + + + + Indicates whether to use default coloring rules. + + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing texts. + + + + + Regular expression to be matched. You must specify either text or regex. + + + + + Text to be matched. You must specify either text or regex. + + + + + Indicates whether to match whole words only. + + + + + Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed. + + + + + Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed. + + + + + Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing. + + + + + + + + + + + + + Condition that must be met in order to set the specified font color. + + + + + Background color. + + + + + Font color. + + + + + Font style of matched text. + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + Name of the target. + + + + + + + + + + + + + + + Name of the target. + + + + + Layout used to format log messages. + + + + + + + + + + + + + + + + + + + + Name of the target. + + + + + Web service URL. + + + + + Web service namespace. + + + + + Protocol to be used when calling web service. + + + + + Web service method name. + + + + + Encoding. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Body layout (can be repeated multiple times). + + + + + Header layout. + + + + + Footer layout. + + + + + Quote Character. + + + + + Quoting mode. + + + + + Indicates whether CVS should include header. + + + + + Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). + + + + + Column delimiter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Layout of the column. + + + + + Name of the column. + + + + + + + + + + + + + + Body layout (can be repeated multiple times). + + + + + Header layout. + + + + + Footer layout. + + + + + + + + + + + + + + + + + + + + + Layout text. + + + + + + + + + + + + + + + Condition expression. + + + + + Action to be taken when filter matches. + + + + + + + + + + + + + + + + + + + + + + + + + + Layout to be used to filter log messages. + + + + + Substring to be matched. + + + + + Action to be taken when filter matches. + + + + + Indicates whether to ignore case when comparing strings. + + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. + + + + + + + + + + + + + + + + + Layout to be used to filter log messages. + + + + + Substring to be matched. + + + + + Action to be taken when filter matches. + + + + + Indicates whether to ignore case when comparing strings. + + + + + + + + + + + + + + + + + Indicates whether to ignore case when comparing strings. + + + + + Layout to be used to filter log messages. + + + + + Action to be taken when filter matches. + + + + + String to compare the layout to. + + + + + + \ No newline at end of file diff --git a/WindowsPhone/RemoteAgents/RemoteAgents/RemoteAgents.csproj b/WindowsPhone/RemoteAgents/RemoteAgents/RemoteAgents.csproj index e19be1e..f110bf2 100644 --- a/WindowsPhone/RemoteAgents/RemoteAgents/RemoteAgents.csproj +++ b/WindowsPhone/RemoteAgents/RemoteAgents/RemoteAgents.csproj @@ -96,7 +96,6 @@ MainPage.xaml - True @@ -117,6 +116,13 @@ + + Always + Designer + + + Designer + @@ -152,20 +158,16 @@ - - ..\packages\Newtonsoft.Json.6.0.1\lib\portable-net45+wp80+win8\Newtonsoft.Json.dll + + ..\..\jsonrpc4net\jsonrpc4net\Bin\Debug\jsonrpc4net.dll - - ..\packages\Microsoft.Net.Http.2.2.18\lib\sl4-windowsphone71\System.Net.Http.dll - - - ..\packages\Microsoft.Net.Http.2.2.18\lib\sl4-windowsphone71\System.Net.Http.Extensions.dll - - - ..\packages\Microsoft.Net.Http.2.2.18\lib\sl4-windowsphone71\System.Net.Http.Primitives.dll + + ..\packages\NLog.2.1.0\lib\sl4-windowsphone71\NLog.dll - + + + + \ No newline at end of file diff --git a/WindowsPhone/jsonrpc4net/jsonrpc4net/packages.config b/WindowsPhone/jsonrpc4net/jsonrpc4net/packages.config new file mode 100644 index 0000000..e09220d --- /dev/null +++ b/WindowsPhone/jsonrpc4net/jsonrpc4net/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file -- 2.1.4