Skip to content

Instantly share code, notes, and snippets.

View mauroa's full-sized avatar

Mauro Agnoletti mauroa

  • Microsoft
  • Buenos Aires, Argentina
View GitHub Profile
@mauroa
mauroa / description
Last active April 5, 2016 23:03
Debug XMA Agents
Steps to debug an XMA Agent on the Mac:
* Windows Side:
- Override Connection Settings for XMA:
i) Create a Messaging.ini file in '%LOCALAPPDATA%\Xamarin'
ii) Add the following content to the file (the Port could be any. It's just to maintain it fixed):
Port=55555
RestartAgentsAutomatically=false
iii) Reconnect to XMA to allow it to connect overriding the default settings
@mauroa
mauroa / Designer.log
Created April 1, 2016 14:03
Mono Error
Xamarin.Messaging.Client.MessagingClient Error: 0 : [2016-04-01 11:01:54.0134] An error occured on client Designer410276 while executing a reply for topic xvs/Designer/4.1.0.276/send-payload/0/0/0
System.BadImageFormatException: Method has zero rva
File name: 'Mono.Posix'
at Xamarin.Messaging.Designer.SendPayloadHandler+<ExecuteAsync>d__4.MoveNext () <0xa666b88 + 0x00353> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18bc5a0 + 0x00035> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18b9d40 + 0x000b7> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18b9ca0 + 0x00087> in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18b9c50 +
@mauroa
mauroa / AsyncProcess.cs
Last active May 10, 2016 20:20
Async Process in C#
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@mauroa
mauroa / MessagingClientSample.cs
Last active January 7, 2016 18:55
Messaging Client sample to retrieve simulators
using System.Net.Mqtt;
using System.Net.Mqtt.Client;
using System.Threading.Tasks;
using Xamarin.Messaging;
using Xamarin.Messaging.Client;
using Xamarin.Messaging.Client.Serialization;
using Xamarin.Messaging.IDB.Contracts;
public class MessagingClientSample
{
@mauroa
mauroa / a-Sample.cs
Last active October 16, 2015 22:49
Sample of how to make a Reactive and async Process in C#
* Sample 1:
var processInfo = new ProcessStartInfo ();
//TODO: Configure processInfo as desired
try {
//Waiting the process to complete and exit
await new Process().RunAsync(processInfo);
} catch(Exception ex) {
2015-10-15 16:51:19.999 mtouch[6699:1699401] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-9062/DVTFoundation/DeveloperStructure/DVTDeveloperPaths.m:75
Details: setDefaultDeveloperPathsClass: should not be called after the +defaultPaths have already been created.
Object: <DVTDeveloperPaths>
Method: +setDefaultDeveloperPathsClass:
Hints: None
Backtrace:
0 0x000000010e625c5a -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x000000010e62578e _DVTAssertionHandler (in DVTFoundation)
2 0x000000010e6259a5 _DVTAssertionFailureHandler (in DVTFoundation)
3 0x000000010e40321d +[DVTDeveloperPaths setDefaultDeveloperPathsClass:] (in DVTFoundation)
controllers.controller('HomeController', function(filtrosService, httpService) {
var viewModel = this;
viewModel.nombre = 'Antes';
viewModel.especialidades = filtrosService.getEspecialidades();
viewModel.actualizarNombre = function(nombreNuevo){
alert('estoy en actualizar nombre: ' + nombreNuevo);
viewModel.nombre = nombreNuevo;
}
Target "_CopyWatch2AppsToBundle: (TargetId:393)" in file "C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets" from project "c:\users\mag\documents\visual studio 2013\Projects\App368\App368\App368.csproj" (target "_CreateAppBundle" depends on it):
3>Using "Ditto" task from assembly "C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MacDev.Tasks.dll".
3>Task "Ditto" (TaskId:269)
3> Task Parameter:SessionId=b5dbe64d7627d034d5af230c9536adab (TaskId:269)
3> Task Parameter:Source=c:\Users\mag\documents\visual studio 2013\Projects\App368\WatchKitApp1\WatchKitApp1.WatchKitApp\bin\iPhoneSimulator\Debug\WatchKitApp1WatchKitApp.app
3> BuildServerPath=..\..\\\bin\iPhoneSimulator\Debug\WatchKitApp1WatchKitApp.app
3> BuildSessionId=
3> Configuration=Debug
3> FullConfiguration=Debug|iPhoneSimulator
3> IsAppExtension=false
@mauroa
mauroa / ToolLocationHelper.cs
Created September 11, 2015 16:16
MSBuild ToolLocationHelper
internal static string ChainReferenceAssemblyPath(string targetFrameworkDirectory)
{
string fullPath = Path.GetFullPath(targetFrameworkDirectory);
lock (locker)
{
chainedReferenceAssemblyPath = chainedReferenceAssemblyPath ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
cachedTargetFrameworkDisplayNames = cachedTargetFrameworkDisplayNames ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
string str2 = null;
if (chainedReferenceAssemblyPath.TryGetValue(fullPath, out str2))
{
@mauroa
mauroa / StartProcessResult.cs
Created August 7, 2015 15:45
Observable Output
using System;
using System.Diagnostics;
using System.Reactive.Linq;
using System.Reactive.Concurrency;
using System.Reactive.Subjects;
using Xamarin.Messaging.Client;
namespace Xamarin.Messaging.AgentManager
{
public class StartProcessResult : IStartProcessResult