Skip to content

Instantly share code, notes, and snippets.

View decriptor's full-sized avatar

Stephen Shaw decriptor

View GitHub Profile
public string FormatXmlContent (string xml)
{
var formattedXml = new StringBuilder();
var reader = XmlReader.Create(new StringReader(xml));
using (var writer = XmlWriter.Create(formattedXml, new XmlWriterSettings { Indent = true }))
{
writer.WriteNode(reader, true);
}
using System;
using System.Text;
using System.Xml;
using System.IO;
namespace TestXmlFormatter
{
class MainClass
{
public static void Main (string[] args)
09:55 $ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-local
MCS [net_4_5] System.Xaml.Hosting.dll
../../../external/referencesource/System.Xaml.Hosting/System/Xaml/Hosting/Configuration/HandlerElementCollection.cs(59,27): error CS0103: The name `FxTrace' does not exist in the current context
../../../external/referencesource/System.Xaml.Hosting/System/Xaml/Hosting/Configuration/HandlerElementCollection.cs(77,27): error CS0103: The name `FxTrace' does not exist in the current context
../../../external/referencesource/System.Xaml.Hosting/System/Xaml/Hosting/Configuration/HandlerElementCollection.cs(90,27): error CS0103: The name `FxTrace' does not exist in the current context
../../../external/referencesource/System.Xaml.Hosting/System/Xaml/Hosting/Configuration/HandlerElementCollection.cs(125,23): error CS0103: The name `FxTrace' does not exist in the current context
../../../external/referencesource/System.Xaml.Hosting/System/Xaml/Hosting/Configuration/XamlHostingConfiguration.cs(26,100
using Blend = System.Activities.Presentation.Internal.PropertyEditing.FromExpression.Framework.PropertyInspector;
using ExpressionEditor = System.Activities.Presentation.Expressions.ExpressionActivityEditor;
using Microsoft.Activities.Presentation.Xaml;
using Microsoft.Activities.Presentation;
using Microsoft.CSharp;
using Microsoft.Compiler.VisualBasic;
using Microsoft.Tools.Common;
using Microsoft.VisualBasic.Activities.XamlIntegration;
using Microsoft.VisualBasic.Activities;
using Microsoft.VisualBasic.CompilerServices;
Process: XamarinStudio [2645]
Path: /Applications/Xamarin Studio.app/Contents/MacOS/XamarinStudio
Identifier: com.xamarin.monodevelop
Version: 5.8.2.5 (5.8.2.5)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: XamarinStudio [2645]
User ID: 501
Date/Time: 2015-03-23 22:41:05.743 -0600
module SumOfMultiples
type SumOfMultiples(multiples) =
new () = SumOfMultiples([3; 5])
member x.To (n : int) =
let isMultiple n = Seq.exists (fun w -> n % w = 0) multiples
let rec f n acc =
if n <= 0 then acc
else f (n - 1) (if isMultiple n then n + acc else acc)
/Users/sshaw/.atom/packages/atom-sharper/server/OmniSharp.sln (default targets) ->
(Build target) ->
/Users/sshaw/.atom/packages/atom-sharper/server/OmniSharp/OmniSharp.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->
Bootstrapper.cs(41,37): error CS0121: The call is ambiguous between the following methods or properties: `Nancy.AsyncNamedPipelineBase<System.Func<Nancy.NancyContext,System.Threading.CancellationToken,System.Threading.Tasks.Task<Nancy.Response>>,System.Func<Nancy.NancyContext,Nancy.Response>>.AddItemToStartOfPipeline(System.Func<Nancy.NancyContext,Nancy.Response>)' and `Nancy.AsyncNamedPipelineBase<System.Func<Nancy.NancyContext,System.Threading.CancellationToken,System.Threading.Tasks.Task<Nancy.Response>>,System.Func<Nancy.NancyContext,Nancy.Response>>.AddItemToStartOfPipeline(Nancy.PipelineItem<System.Func<Nancy.NancyContext,Nancy.Response>>, bool)'
Bootstrapper.cs(42,36): error CS0121: The call is a
mono-rt: Stacktrace:
mono-rt: at <unknown> <0xffffffff>
mono-rt: at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <IL 0x00022, 0xffffffff>
mono-rt: at System.Collections.Generic.List`1..ctor (int) [0x00018] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/List.cs:81
mono-rt: at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider,System.Type,bool) [0x00184] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/MonoCustomAttrs.cs:201
XBuild Engine Version 12.0
Mono, Version 3.6.0.0
Copyright (C) 2005-2013 Various Mono authors
Build started 6/16/2014 10:48:59 AM.
__________________________________________________
Project "/Users/sshaw/code/yastroid/mono/YaSTroid/YaSTroid/YaSTroid.csproj" (Install target(s)):
Target _CheckProjectItems:
CheckProjectItems Task
NativeLibraries:
Build started 6/16/2014 10:31:38 AM.
__________________________________________________
Project "/Users/sshaw/code/yastroid/mono/YaSTroid/YaSTroid/YaSTroid.csproj" (SignAndroidPackage target(s)):
Initial Properties:
__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0
AndroidApplication = True
AndroidLinkMode = None
AndroidManifest = Properties\AndroidManifest.xml