[tomboy/mac-0.15.7] Fix line endings
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tomboy/mac-0.15.7] Fix line endings
- Date: Tue, 8 Sep 2009 19:09:27 +0000 (UTC)
commit 625879e5255e8f2408e0e7b755ab6566e5b31a23
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Tue Sep 8 12:07:52 2009 -0700
Fix line endings
Tomboy-mac.csproj | 624 +++++++++---------
Tomboy/Addins/ExportToHtml/ExportToHtml-mac.csproj | 194 +++---
Tomboy/Addins/Underline/Underline-mac.csproj | 188 +++---
Tomboy/Addins/Underline/Underline.csproj | 172 +++---
Tomboy/Addins/WebSyncService/OAuth/Base.cs | 660 ++++++++++----------
.../Addins/WebSyncService/OAuth/QueryParameter.cs | 408 ++++++------
6 files changed, 1123 insertions(+), 1123 deletions(-)
---
diff --git a/Tomboy-mac.csproj b/Tomboy-mac.csproj
index d7480fe..b3f6403 100644
--- a/Tomboy-mac.csproj
+++ b/Tomboy-mac.csproj
@@ -1,313 +1,313 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <ProjectGuid>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <AssemblyName>Tomboy</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <ApplicationIcon>tomboy.ico</ApplicationIcon>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <SchemaVersion>2.0</SchemaVersion>
- <ReleaseVersion>0.13</ReleaseVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <Execution>
- <Execution />
- </Execution>
- <Build>
- <Build />
- </Build>
- <DefineConstants>MAC</DefineConstants>
- <CustomCommands>
- <CustomCommands>
- <Command type="BeforeBuild" command="prebuild.sh" workingdir="${ProjectDir}" />
- <Command type="AfterBuild" command="postbuild.sh" workingdir="${ProjectDir}" />
- <Command type="Execute" command="mono --debug Tomboy.exe --search" workingdir="${TargetDir}" />
- </CustomCommands>
- </CustomCommands>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <Execution>
- <Execution />
- </Execution>
- <Build>
- <Build />
- </Build>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gtk-sharp\2.12.0.0__35e10195dab3c99f\gtk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\glib-sharp\2.12.0.0__35e10195dab3c99f\glib-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gdk-sharp\2.12.0.0__35e10195dab3c99f\gdk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\atk-sharp\2.12.0.0__35e10195dab3c99f\atk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\pango-sharp\2.12.0.0__35e10195dab3c99f\pango-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>winbin\ICSharpCode.SharpZipLib.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\Mono.Addins\0.4.0.0__0738eb9f132ed756\Mono.Addins.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\Mono.Addins.Gui\0.4.0.0__0738eb9f132ed756\Mono.Addins.Gui.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Mono.Addins.Setup, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\Mono.Addins.Setup\0.4.0.0__0738eb9f132ed756\Mono.Addins.Setup.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>winbin\Mono.Posix.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="System" />
- <Reference Include="Mono.Cairo" />
- <Reference Include="ige-mac-integration-sharp, Version=0.6.0.0, Culture=neutral, PublicKeyToken=8df8155add92b1bc">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>macbin\ige-mac-integration-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Runtime.Remoting" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Tomboy\ActionManager.cs" />
- <Compile Include="Tomboy\Contrast.cs" />
- <Compile Include="Tomboy\Defines.WIN32.cs" />
- <Compile Include="Tomboy\Logger.cs" />
- <Compile Include="Tomboy\MacFactory.cs" />
- <Compile Include="Tomboy\ManagedWinapi.EventDispatchingNativeWindow.cs" />
- <Compile Include="Tomboy\ManagedWinapi.Hotkey.cs" />
- <Compile Include="Tomboy\Note.cs" />
- <Compile Include="Tomboy\NoteBuffer.cs" />
- <Compile Include="Tomboy\NoteManager.cs" />
- <Compile Include="Tomboy\NoteTag.cs" />
- <Compile Include="Tomboy\NoteWindow.cs" />
- <Compile Include="Tomboy\Preferences.cs" />
- <Compile Include="Tomboy\RecentChanges.cs" />
- <Compile Include="Tomboy\Tomboy.cs" />
- <Compile Include="Tomboy\Tray.cs" />
- <Compile Include="Tomboy\Trie.cs" />
- <Compile Include="Tomboy\Undo.cs" />
- <Compile Include="Tomboy\Utils.cs" />
- <Compile Include="Tomboy\Watchers.cs" />
- <Compile Include="Tomboy\TagManager.cs" />
- <Compile Include="Tomboy\Tag.cs" />
- <Compile Include="Tomboy\TagButton.cs" />
- <None Include="Tomboy\WindowsFactory.cs" />
- <None Include="Tomboy\WindowsKeybinder.cs" />
- <Compile Include="Tomboy\PreferencesDialog.cs" />
- <Compile Include="Tomboy\NoteEditor.cs" />
- <Compile Include="Tomboy\AbstractAddin.cs" />
- <Compile Include="Tomboy\ApplicationAddin.cs" />
- <Compile Include="Tomboy\NoteAddin.cs" />
- <Compile Include="Tomboy\AddinManager.cs" />
- <Compile Include="Tomboy\AddinPreferenceFactory.cs" />
- <Compile Include="Tomboy\Synchronization\SyncDialog.cs" />
- <Compile Include="Tomboy\Synchronization\SyncManager.cs" />
- <Compile Include="Tomboy\Synchronization\SyncUtils.cs" />
- <Compile Include="Tomboy\Synchronization\TomboySyncClient.cs" />
- <Compile Include="Tomboy\Synchronization\FileSystemSyncServer.cs" />
- <Compile Include="Tomboy\Synchronization\SyncServiceAddin.cs" />
- <Compile Include="Tomboy\Search.cs" />
- <Compile Include="Tomboy\Notebooks\Notebook.cs" />
- <Compile Include="Tomboy\Notebooks\NotebookManager.cs" />
- <Compile Include="Tomboy\Notebooks\CreateNotebookDialog.cs" />
- <Compile Include="Tomboy\Notebooks\NotebookNoteAddin.cs" />
- <Compile Include="Tomboy\Notebooks\NotebookMenuItem.cs" />
- <Compile Include="Tomboy\Notebooks\NotebookApplicationAddin.cs" />
- <Compile Include="Tomboy\Notebooks\NotebookNewNoteMenuItem.cs" />
- <Compile Include="Tomboy\PreferenceTabAddin.cs" />
- <Compile Include="Tomboy\Notebooks\NotebooksTreeView.cs" />
- <Compile Include="Tomboy\RecentTreeView.cs" />
- <Compile Include="Tomboy\Services.cs" />
- <Compile Include="Tomboy\Keybinder.cs" />
- <Compile Include="Tomboy\NativeApplication.cs" />
- <Compile Include="Tomboy\PlatformFactory.cs" />
- <Compile Include="Tomboy\PreferencesClient.cs" />
- <Compile Include="Tomboy\PrefsKeybinder.cs" />
- <None Include="Tomboy\WindowsApplication.cs" />
- <Compile Include="Tomboy\XmlPreferencesClient.cs" />
- <Compile Include="Tomboy\MacApplication.cs" />
- <Compile Include="Tomboy\IRemoteControl.cs" />
- <Compile Include="Tomboy\RemoteControl.cs" />
- <Compile Include="Tomboy\RemoteControlProxy.cs" />
- <Compile Include="Tomboy\RemoteControlWrapper.cs" />
- <None Include="ChangeLog" />
- <None Include="COPYING" />
- <None Include="Tomboy\Defines.cs.in" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="UIManagerLayout.xml" />
- <EmbeddedResource Include="Tomboy.addin.xml" />
- <EmbeddedResource Include="filter-note-all.png" />
- <EmbeddedResource Include="filter-note-unfiled.png" />
- <EmbeddedResource Include="note-new.png" />
- <EmbeddedResource Include="note.png" />
- <EmbeddedResource Include="notebook-new.png" />
- <EmbeddedResource Include="notebook.png" />
- <EmbeddedResource Include="pin-active.png" />
- <EmbeddedResource Include="pin-down.png" />
- <EmbeddedResource Include="pin-up.png" />
- <EmbeddedResource Include="tomboy.png" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="tomboy.ico" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ProjectExtensions>
- <MonoDevelop>
- <Properties>
- <Deployment.LinuxDeployData generateScript="false" />
- <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="./Makefile.am" ExecuteTargetName="run">
- <BuildFilesVar />
- <DeployFilesVar />
- <ResourcesVar />
- <OthersVar />
- <GacRefVar />
- <AsmRefVar />
- <ProjectRefVar />
- </MonoDevelop.Autotools.MakefileInfo>
- </Properties>
- </MonoDevelop>
- <VisualStudio />
- </ProjectExtensions>
- <PropertyGroup>
- <PreBuildEvent>copy "$(ProjectDir)data\icons\tomboy.ico" "$(ProjectDir)tomboy.ico"
-copy "$(ProjectDir)data\icons\hicolor_apps_48x48_tomboy.png" "$(ProjectDir)tomboy.png"
-copy "$(ProjectDir)data\icons\hicolor_places_22x22_note.png" "$(ProjectDir)note.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_16x16_note-new.png" "$(ProjectDir)note-new.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-all.png" "$(ProjectDir)filter-note-all.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-unfiled.png" "$(ProjectDir)\filter-note-unfiled.png"
-copy "$(ProjectDir)data\icons\hicolor_places_22x22_notebook.png" "$(ProjectDir)notebook.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_48x48_notebook-new.png" "$(ProjectDir)notebook-new.png"
-copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-down.png" "$(ProjectDir)pin-down.png"
-copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-up.png" "$(ProjectDir)pin-up.png"
-copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-active.png" "$(ProjectDir)pin-active.png"
-copy "$(ProjectDir)Tomboy\Tomboy.addin.xml" "$(ProjectDir)"
-copy "$(ProjectDir)data\UIManagerLayout.xml" "$(ProjectDir)"</PreBuildEvent>
- <PostBuildEvent>copy "$(ProjectDir)data\icons\tomboy.ico" "$(ProjectDir)tomboy.ico"
-
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\apps"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\apps"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\apps"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\apps"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\apps"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\apps"
-
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\actions"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\actions"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\actions"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\actions"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\actions"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\actions"
-
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\places"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\places"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\places"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\places"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\places"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\places"
-
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\status"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\status"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\status"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\status"
-mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\status"
-
-copy "$(ProjectDir)data\icons\hicolor_actions_16x16_note-new.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\actions\note-new.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_48x48_notebook-new.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\actions\notebook-new.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-all.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\actions\filter-note-all.png"
-copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-unfiled.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\actions\filter-note-unfiled.png"
-copy "$(ProjectDir)data\icons\hicolor_apps_16x16_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\apps\tomboy.png"
-copy "$(ProjectDir)data\icons\hicolor_apps_22x22_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\apps\tomboy.png"
-copy "$(ProjectDir)data\icons\hicolor_apps_24x24_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\apps\tomboy.png"
-copy "$(ProjectDir)data\icons\hicolor_apps_32x32_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\apps\tomboy.png"
-copy "$(ProjectDir)data\icons\hicolor_apps_48x48_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\apps\tomboy.png"
-copy "$(ProjectDir)data\icons\hicolor_apps_scalable_tomboy.svg" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\apps\tomboy.svg"
-copy "$(ProjectDir)data\icons\hicolor_places_22x22_note.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\places\note.png"
-copy "$(ProjectDir)data\icons\hicolor_places_22x22_notebook.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\places\notebook.png"
-copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-down.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status\pin-down.png"
-copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-up.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status\pin-up.png"
-copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-active.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status\pin-active.png"
-
-copy "$(ProjectDir)Tomboy\Tomboy.addin.xml" "$(ProjectDir)"
-copy "$(ProjectDir)data\UIManagerLayout.xml" "$(ProjectDir)"</PostBuildEvent>
- </PropertyGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <ProjectGuid>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AssemblyName>Tomboy</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>2.0</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <ApplicationIcon>tomboy.ico</ApplicationIcon>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ReleaseVersion>0.13</ReleaseVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+ <Execution>
+ <Execution />
+ </Execution>
+ <Build>
+ <Build />
+ </Build>
+ <DefineConstants>MAC</DefineConstants>
+ <CustomCommands>
+ <CustomCommands>
+ <Command type="BeforeBuild" command="prebuild.sh" workingdir="${ProjectDir}" />
+ <Command type="AfterBuild" command="postbuild.sh" workingdir="${ProjectDir}" />
+ <Command type="Execute" command="mono --debug Tomboy.exe --search" workingdir="${TargetDir}" />
+ </CustomCommands>
+ </CustomCommands>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+ <Execution>
+ <Execution />
+ </Execution>
+ <Build>
+ <Build />
+ </Build>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gtk-sharp\2.12.0.0__35e10195dab3c99f\gtk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\glib-sharp\2.12.0.0__35e10195dab3c99f\glib-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gdk-sharp\2.12.0.0__35e10195dab3c99f\gdk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\atk-sharp\2.12.0.0__35e10195dab3c99f\atk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\pango-sharp\2.12.0.0__35e10195dab3c99f\pango-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>winbin\ICSharpCode.SharpZipLib.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\Mono.Addins\0.4.0.0__0738eb9f132ed756\Mono.Addins.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\Mono.Addins.Gui\0.4.0.0__0738eb9f132ed756\Mono.Addins.Gui.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Mono.Addins.Setup, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\Mono.Addins.Setup\0.4.0.0__0738eb9f132ed756\Mono.Addins.Setup.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>winbin\Mono.Posix.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System" />
+ <Reference Include="Mono.Cairo" />
+ <Reference Include="ige-mac-integration-sharp, Version=0.6.0.0, Culture=neutral, PublicKeyToken=8df8155add92b1bc">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>macbin\ige-mac-integration-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System.Runtime.Remoting" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Tomboy\ActionManager.cs" />
+ <Compile Include="Tomboy\Contrast.cs" />
+ <Compile Include="Tomboy\Defines.WIN32.cs" />
+ <Compile Include="Tomboy\Logger.cs" />
+ <Compile Include="Tomboy\MacFactory.cs" />
+ <Compile Include="Tomboy\ManagedWinapi.EventDispatchingNativeWindow.cs" />
+ <Compile Include="Tomboy\ManagedWinapi.Hotkey.cs" />
+ <Compile Include="Tomboy\Note.cs" />
+ <Compile Include="Tomboy\NoteBuffer.cs" />
+ <Compile Include="Tomboy\NoteManager.cs" />
+ <Compile Include="Tomboy\NoteTag.cs" />
+ <Compile Include="Tomboy\NoteWindow.cs" />
+ <Compile Include="Tomboy\Preferences.cs" />
+ <Compile Include="Tomboy\RecentChanges.cs" />
+ <Compile Include="Tomboy\Tomboy.cs" />
+ <Compile Include="Tomboy\Tray.cs" />
+ <Compile Include="Tomboy\Trie.cs" />
+ <Compile Include="Tomboy\Undo.cs" />
+ <Compile Include="Tomboy\Utils.cs" />
+ <Compile Include="Tomboy\Watchers.cs" />
+ <Compile Include="Tomboy\TagManager.cs" />
+ <Compile Include="Tomboy\Tag.cs" />
+ <Compile Include="Tomboy\TagButton.cs" />
+ <None Include="Tomboy\WindowsFactory.cs" />
+ <None Include="Tomboy\WindowsKeybinder.cs" />
+ <Compile Include="Tomboy\PreferencesDialog.cs" />
+ <Compile Include="Tomboy\NoteEditor.cs" />
+ <Compile Include="Tomboy\AbstractAddin.cs" />
+ <Compile Include="Tomboy\ApplicationAddin.cs" />
+ <Compile Include="Tomboy\NoteAddin.cs" />
+ <Compile Include="Tomboy\AddinManager.cs" />
+ <Compile Include="Tomboy\AddinPreferenceFactory.cs" />
+ <Compile Include="Tomboy\Synchronization\SyncDialog.cs" />
+ <Compile Include="Tomboy\Synchronization\SyncManager.cs" />
+ <Compile Include="Tomboy\Synchronization\SyncUtils.cs" />
+ <Compile Include="Tomboy\Synchronization\TomboySyncClient.cs" />
+ <Compile Include="Tomboy\Synchronization\FileSystemSyncServer.cs" />
+ <Compile Include="Tomboy\Synchronization\SyncServiceAddin.cs" />
+ <Compile Include="Tomboy\Search.cs" />
+ <Compile Include="Tomboy\Notebooks\Notebook.cs" />
+ <Compile Include="Tomboy\Notebooks\NotebookManager.cs" />
+ <Compile Include="Tomboy\Notebooks\CreateNotebookDialog.cs" />
+ <Compile Include="Tomboy\Notebooks\NotebookNoteAddin.cs" />
+ <Compile Include="Tomboy\Notebooks\NotebookMenuItem.cs" />
+ <Compile Include="Tomboy\Notebooks\NotebookApplicationAddin.cs" />
+ <Compile Include="Tomboy\Notebooks\NotebookNewNoteMenuItem.cs" />
+ <Compile Include="Tomboy\PreferenceTabAddin.cs" />
+ <Compile Include="Tomboy\Notebooks\NotebooksTreeView.cs" />
+ <Compile Include="Tomboy\RecentTreeView.cs" />
+ <Compile Include="Tomboy\Services.cs" />
+ <Compile Include="Tomboy\Keybinder.cs" />
+ <Compile Include="Tomboy\NativeApplication.cs" />
+ <Compile Include="Tomboy\PlatformFactory.cs" />
+ <Compile Include="Tomboy\PreferencesClient.cs" />
+ <Compile Include="Tomboy\PrefsKeybinder.cs" />
+ <None Include="Tomboy\WindowsApplication.cs" />
+ <Compile Include="Tomboy\XmlPreferencesClient.cs" />
+ <Compile Include="Tomboy\MacApplication.cs" />
+ <Compile Include="Tomboy\IRemoteControl.cs" />
+ <Compile Include="Tomboy\RemoteControl.cs" />
+ <Compile Include="Tomboy\RemoteControlProxy.cs" />
+ <Compile Include="Tomboy\RemoteControlWrapper.cs" />
+ <None Include="ChangeLog" />
+ <None Include="COPYING" />
+ <None Include="Tomboy\Defines.cs.in" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="UIManagerLayout.xml" />
+ <EmbeddedResource Include="Tomboy.addin.xml" />
+ <EmbeddedResource Include="filter-note-all.png" />
+ <EmbeddedResource Include="filter-note-unfiled.png" />
+ <EmbeddedResource Include="note-new.png" />
+ <EmbeddedResource Include="note.png" />
+ <EmbeddedResource Include="notebook-new.png" />
+ <EmbeddedResource Include="notebook.png" />
+ <EmbeddedResource Include="pin-active.png" />
+ <EmbeddedResource Include="pin-down.png" />
+ <EmbeddedResource Include="pin-up.png" />
+ <EmbeddedResource Include="tomboy.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="tomboy.ico" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <Deployment.LinuxDeployData generateScript="false" />
+ <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="./Makefile.am" ExecuteTargetName="run">
+ <BuildFilesVar />
+ <DeployFilesVar />
+ <ResourcesVar />
+ <OthersVar />
+ <GacRefVar />
+ <AsmRefVar />
+ <ProjectRefVar />
+ </MonoDevelop.Autotools.MakefileInfo>
+ </Properties>
+ </MonoDevelop>
+ <VisualStudio />
+ </ProjectExtensions>
+ <PropertyGroup>
+ <PreBuildEvent>copy "$(ProjectDir)data\icons\tomboy.ico" "$(ProjectDir)tomboy.ico"
+copy "$(ProjectDir)data\icons\hicolor_apps_48x48_tomboy.png" "$(ProjectDir)tomboy.png"
+copy "$(ProjectDir)data\icons\hicolor_places_22x22_note.png" "$(ProjectDir)note.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_16x16_note-new.png" "$(ProjectDir)note-new.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-all.png" "$(ProjectDir)filter-note-all.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-unfiled.png" "$(ProjectDir)\filter-note-unfiled.png"
+copy "$(ProjectDir)data\icons\hicolor_places_22x22_notebook.png" "$(ProjectDir)notebook.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_48x48_notebook-new.png" "$(ProjectDir)notebook-new.png"
+copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-down.png" "$(ProjectDir)pin-down.png"
+copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-up.png" "$(ProjectDir)pin-up.png"
+copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-active.png" "$(ProjectDir)pin-active.png"
+copy "$(ProjectDir)Tomboy\Tomboy.addin.xml" "$(ProjectDir)"
+copy "$(ProjectDir)data\UIManagerLayout.xml" "$(ProjectDir)"</PreBuildEvent>
+ <PostBuildEvent>copy "$(ProjectDir)data\icons\tomboy.ico" "$(ProjectDir)tomboy.ico"
+
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\apps"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\apps"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\apps"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\apps"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\apps"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\apps"
+
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\actions"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\actions"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\actions"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\actions"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\actions"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\actions"
+
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\places"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\places"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\places"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\places"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\places"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\places"
+
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\status"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\status"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\status"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\status"
+mkdir "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\status"
+
+copy "$(ProjectDir)data\icons\hicolor_actions_16x16_note-new.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\actions\note-new.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_48x48_notebook-new.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\actions\notebook-new.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-all.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\actions\filter-note-all.png"
+copy "$(ProjectDir)data\icons\hicolor_actions_22x22_filter-note-unfiled.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\actions\filter-note-unfiled.png"
+copy "$(ProjectDir)data\icons\hicolor_apps_16x16_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\apps\tomboy.png"
+copy "$(ProjectDir)data\icons\hicolor_apps_22x22_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\apps\tomboy.png"
+copy "$(ProjectDir)data\icons\hicolor_apps_24x24_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\24x24\apps\tomboy.png"
+copy "$(ProjectDir)data\icons\hicolor_apps_32x32_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\32x32\apps\tomboy.png"
+copy "$(ProjectDir)data\icons\hicolor_apps_48x48_tomboy.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\48x48\apps\tomboy.png"
+copy "$(ProjectDir)data\icons\hicolor_apps_scalable_tomboy.svg" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\scalable\apps\tomboy.svg"
+copy "$(ProjectDir)data\icons\hicolor_places_22x22_note.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\places\note.png"
+copy "$(ProjectDir)data\icons\hicolor_places_22x22_notebook.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\22x22\places\notebook.png"
+copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-down.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status\pin-down.png"
+copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-up.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status\pin-up.png"
+copy "$(ProjectDir)data\icons\hicolor_status_16x16_pin-active.png" "$(ProjectDir)bin\Debug\tomboy\icons\hicolor\16x16\status\pin-active.png"
+
+copy "$(ProjectDir)Tomboy\Tomboy.addin.xml" "$(ProjectDir)"
+copy "$(ProjectDir)data\UIManagerLayout.xml" "$(ProjectDir)"</PostBuildEvent>
+ </PropertyGroup>
</Project>
\ No newline at end of file
diff --git a/Tomboy/Addins/ExportToHtml/ExportToHtml-mac.csproj b/Tomboy/Addins/ExportToHtml/ExportToHtml-mac.csproj
index e0e2d89..51d36d8 100644
--- a/Tomboy/Addins/ExportToHtml/ExportToHtml-mac.csproj
+++ b/Tomboy/Addins/ExportToHtml/ExportToHtml-mac.csproj
@@ -1,98 +1,98 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{88AB220D-4FB4-4875-8865-25CB6DF55EF8}</ProjectGuid>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <OutputType>Library</OutputType>
- <NoStandardLibraries>false</NoStandardLibraries>
- <AssemblyName>ExportToHtml</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RootNamespace>ExportToHtml</RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
- <NoStdLib>False</NoStdLib>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\..\bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
- <RegisterForComInterop>False</RegisterForComInterop>
- <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
- <BaseAddress>4194304</BaseAddress>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gtk-sharp\2.12.0.0__35e10195dab3c99f\gtk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\glib-sharp\2.12.0.0__35e10195dab3c99f\glib-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gdk-sharp\2.12.0.0__35e10195dab3c99f\gdk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\atk-sharp\2.12.0.0__35e10195dab3c99f\atk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\pango-sharp\2.12.0.0__35e10195dab3c99f\pango-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="Mono.Posix" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="ExportToHtml.addin.xml" />
- <EmbeddedResource Include="ExportToHtml.xsl">
- <LogicalName>ExportToHtml.xsl</LogicalName>
- </EmbeddedResource>
- <None Include="Makefile.am" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ExportToHtmlDialog.cs" />
- <Compile Include="ExportToHtmlNoteAddin.cs" />
- <Compile Include="NoteNameResolver.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\Tomboy-mac.csproj">
- <Project>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</Project>
- <Name>Tomboy-mac</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
- <ProjectExtensions>
- <VisualStudio AllowExistingFolder="true" />
- </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{88AB220D-4FB4-4875-8865-25CB6DF55EF8}</ProjectGuid>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputType>Library</OutputType>
+ <NoStandardLibraries>false</NoStandardLibraries>
+ <AssemblyName>ExportToHtml</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <RootNamespace>ExportToHtml</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+ <NoStdLib>False</NoStdLib>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
+ <RegisterForComInterop>False</RegisterForComInterop>
+ <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
+ <BaseAddress>4194304</BaseAddress>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gtk-sharp\2.12.0.0__35e10195dab3c99f\gtk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\glib-sharp\2.12.0.0__35e10195dab3c99f\glib-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gdk-sharp\2.12.0.0__35e10195dab3c99f\gdk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\atk-sharp\2.12.0.0__35e10195dab3c99f\atk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\pango-sharp\2.12.0.0__35e10195dab3c99f\pango-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="Mono.Posix" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="ExportToHtml.addin.xml" />
+ <EmbeddedResource Include="ExportToHtml.xsl">
+ <LogicalName>ExportToHtml.xsl</LogicalName>
+ </EmbeddedResource>
+ <None Include="Makefile.am" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ExportToHtmlDialog.cs" />
+ <Compile Include="ExportToHtmlNoteAddin.cs" />
+ <Compile Include="NoteNameResolver.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tomboy-mac.csproj">
+ <Project>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</Project>
+ <Name>Tomboy-mac</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+ <ProjectExtensions>
+ <VisualStudio AllowExistingFolder="true" />
+ </ProjectExtensions>
</Project>
\ No newline at end of file
diff --git a/Tomboy/Addins/Underline/Underline-mac.csproj b/Tomboy/Addins/Underline/Underline-mac.csproj
index 0068808..d1dac14 100644
--- a/Tomboy/Addins/Underline/Underline-mac.csproj
+++ b/Tomboy/Addins/Underline/Underline-mac.csproj
@@ -1,95 +1,95 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{15A0F2C4-9BAD-11DE-B022-C19356D89593}</ProjectGuid>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <OutputType>Library</OutputType>
- <NoStandardLibraries>false</NoStandardLibraries>
- <AssemblyName>Underline</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RootNamespace>Underline</RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
- <NoStdLib>False</NoStdLib>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\..\bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
- <RegisterForComInterop>False</RegisterForComInterop>
- <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
- <BaseAddress>4194304</BaseAddress>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gtk-sharp\2.12.0.0__35e10195dab3c99f\gtk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\glib-sharp\2.12.0.0__35e10195dab3c99f\glib-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gdk-sharp\2.12.0.0__35e10195dab3c99f\gdk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\atk-sharp\2.12.0.0__35e10195dab3c99f\atk-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\pango-sharp\2.12.0.0__35e10195dab3c99f\pango-sharp.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Mono.Posix" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Underline.addin.xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="UnderlineMenuItem.cs" />
- <Compile Include="UnderlineNoteAddin.cs" />
- <Compile Include="UnderlineTag.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Makefile.am" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\Tomboy-mac.csproj">
- <Project>{30A75F9A-7305-465E-8754-334345424569}</Project>
- <Name>Tomboy-mac</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
- <ProjectExtensions>
- <VisualStudio AllowExistingFolder="true" />
- </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{15A0F2C4-9BAD-11DE-B022-C19356D89593}</ProjectGuid>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputType>Library</OutputType>
+ <NoStandardLibraries>false</NoStandardLibraries>
+ <AssemblyName>Underline</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <RootNamespace>Underline</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+ <NoStdLib>False</NoStdLib>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
+ <RegisterForComInterop>False</RegisterForComInterop>
+ <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
+ <BaseAddress>4194304</BaseAddress>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gtk-sharp\2.12.0.0__35e10195dab3c99f\gtk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\glib-sharp\2.12.0.0__35e10195dab3c99f\glib-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\gdk-sharp\2.12.0.0__35e10195dab3c99f\gdk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\atk-sharp\2.12.0.0__35e10195dab3c99f\atk-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\..\Library\Frameworks\Mono.framework\Versions\Current\lib\mono\gac\pango-sharp\2.12.0.0__35e10195dab3c99f\pango-sharp.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Mono.Posix" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Underline.addin.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="UnderlineMenuItem.cs" />
+ <Compile Include="UnderlineNoteAddin.cs" />
+ <Compile Include="UnderlineTag.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Makefile.am" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tomboy-mac.csproj">
+ <Project>{30A75F9A-7305-465E-8754-334345424569}</Project>
+ <Name>Tomboy-mac</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+ <ProjectExtensions>
+ <VisualStudio AllowExistingFolder="true" />
+ </ProjectExtensions>
</Project>
\ No newline at end of file
diff --git a/Tomboy/Addins/Underline/Underline.csproj b/Tomboy/Addins/Underline/Underline.csproj
index d5ed797..f184a7a 100644
--- a/Tomboy/Addins/Underline/Underline.csproj
+++ b/Tomboy/Addins/Underline/Underline.csproj
@@ -1,87 +1,87 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{15A0F2C4-9BAD-11DE-B022-C19356D89593}</ProjectGuid>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <OutputType>Library</OutputType>
- <NoStandardLibraries>false</NoStandardLibraries>
- <AssemblyName>Underline</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RootNamespace>Underline</RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
- <NoStdLib>False</NoStdLib>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>Full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\..\bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <PlatformTarget>x86</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
- <RegisterForComInterop>False</RegisterForComInterop>
- <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
- <BaseAddress>4194304</BaseAddress>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Mac|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Mac\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugType>Full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="Mono.Posix, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\winbin\Mono.Posix.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Underline.addin.xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="UnderlineMenuItem.cs" />
- <Compile Include="UnderlineNoteAddin.cs" />
- <Compile Include="UnderlineTag.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Makefile.am" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\Tomboy.csproj">
- <Project>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</Project>
- <Name>Tomboy</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
- <ProjectExtensions>
- <VisualStudio AllowExistingFolder="true" />
- </ProjectExtensions>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{15A0F2C4-9BAD-11DE-B022-C19356D89593}</ProjectGuid>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputType>Library</OutputType>
+ <NoStandardLibraries>false</NoStandardLibraries>
+ <AssemblyName>Underline</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <RootNamespace>Underline</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+ <NoStdLib>False</NoStdLib>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>Full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
+ <RegisterForComInterop>False</RegisterForComInterop>
+ <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
+ <BaseAddress>4194304</BaseAddress>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Mac|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Mac\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>Full</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="Mono.Posix, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\winbin\Mono.Posix.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Underline.addin.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="UnderlineMenuItem.cs" />
+ <Compile Include="UnderlineNoteAddin.cs" />
+ <Compile Include="UnderlineTag.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Makefile.am" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tomboy.csproj">
+ <Project>{315DBB30-1461-4A41-A23F-A888D84E1EA0}</Project>
+ <Name>Tomboy</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+ <ProjectExtensions>
+ <VisualStudio AllowExistingFolder="true" />
+ </ProjectExtensions>
</Project>
\ No newline at end of file
diff --git a/Tomboy/Addins/WebSyncService/OAuth/Base.cs b/Tomboy/Addins/WebSyncService/OAuth/Base.cs
index e24ec57..d70566a 100644
--- a/Tomboy/Addins/WebSyncService/OAuth/Base.cs
+++ b/Tomboy/Addins/WebSyncService/OAuth/Base.cs
@@ -1,331 +1,331 @@
-//
-// OAuthBase.cs
-//
-// Author:
-// Bojan Rajkovic <bojanr brandeis edu>
-// Shannon Whitley <swhitley whitleymedia com>
-// Eran Sandler <http://eran.sandler.co.il/>
-// Sandy Armstrong <sanfordarmstrong gmail com>
-//
-// Copyright (c) 2009 Bojan Rajkovic
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using OAuth;
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-using System.Text;
-using System.Web;
-
-namespace OAuth
-{
- /// <summary>
- /// Provides a base class for OAuth authentication and signing.
- /// </summary>
- public class Base
- {
- class LoggerAdapter
- {
- public void LogDebug (string format, params object[] objects)
- {
- if (Debugging)
- Tomboy.Logger.Debug (format, objects);
- }
-
- public bool Debugging { get; set; }
- }
-
- private readonly LoggerAdapter log = new LoggerAdapter ();
- private bool debugging;
-
- public bool Debugging
- {
- get { return debugging; }
- set { debugging = value; log.Debugging = value; }
- }
-
- private const string OAuthVersion = "1.0";
-
- //
- // List of know and used oauth parameters' names
- //
- private const string OAuthConsumerKeyKey = "oauth_consumer_key";
- private const string OAuthCallbackKey = "oauth_callback";
- private const string OAuthVersionKey = "oauth_version";
- private const string OAuthSignatureMethodKey = "oauth_signature_method";
- private const string OAuthSignatureKey = "oauth_signature";
- private const string OAuthTimestampKey = "oauth_timestamp";
- private const string OAuthNonceKey = "oauth_nonce";
- private const string OAuthTokenKey = "oauth_token";
- private const string OAuthTokenSecretKey = "oauth_token_secret";
- private const string OAuthVerifierKey = "oauth_verifier";
-
- private const string HMACSHA1SignatureType = "HMAC-SHA1";
- private const string PlainTextSignatureType = "PLAINTEXT";
- private const string RSASHA1SignatureType = "RSA-SHA1";
-
- private Random random = new Random ();
-
- private string unreservedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~";
-
- /// <summary>
- /// Helper function to compute a hash value.
- /// </summary>
- /// <param name="hashAlgorithm">
- /// The hashing algoirhtm used. If that algorithm needs some initialization, like HMAC and its derivatives,
- /// they should be initialized prior to passing it to this function.
- /// </param>
- /// <param name="data">The data to hash.</param>
- /// <returns>A Base64 string of the hash value.</returns>
- private string ComputeHash (HashAlgorithm hashAlgorithm, string data)
- {
- log.LogDebug ("Computing hash for data {0}", data);
-
- if (hashAlgorithm == null) throw new ArgumentNullException ("hashAlgorithm");
- if (string.IsNullOrEmpty (data)) throw new ArgumentNullException ("data");
-
- byte[] dataBuffer = System.Text.Encoding.ASCII.GetBytes (data);
- byte[] hashBytes = hashAlgorithm.ComputeHash (dataBuffer);
-
- return Convert.ToBase64String (hashBytes);
- }
-
- /// <summary>
- /// URL encodes a string using OAuth's encoding scheme (slightly different from HttpUtility's UrlEncode).
- /// </summary>
- /// <param name="value">The string to URL encode.</param>
- /// <returns>An URL encoded string.</returns>
- private string UrlEncode (string value)
- {
- log.LogDebug ("URL encoding value.");
- var result = new StringBuilder ();
-
- foreach (char symbol in value) {
- if (unreservedChars.IndexOf(symbol) != -1) result.Append(symbol);
- else result.Append('%' + String.Format("{0:X2}", (int)symbol));
- }
-
- return result.ToString();
- }
-
- /// <summary>
- /// Internal function to cut out all non oauth query string parameters.
- /// </summary>
- /// <param name="parameters">The query string part of the URL.</param>
- /// <returns>A list of QueryParameter each containing the parameter name and value.</returns>
- private IEnumerable<IQueryParameter<string>> GetQueryParameters (string parameters)
- {
- log.LogDebug ("Creating list of parameters from parameter string {0}", parameters);
-
- return CreateQueryParametersIterator (parameters);
- }
-
- private IEnumerable<IQueryParameter<string>> CreateQueryParametersIterator (string parameters)
- {
- if (parameters == null) throw new ArgumentNullException ("parameters");
- var parameterDictionary = HttpUtility.ParseQueryString (parameters).ToDictionary ();
-
- foreach (var kvp in parameterDictionary)
- yield return new QueryParameter<string> (kvp.Key, kvp.Value, s => string.IsNullOrEmpty (s));
- }
-
- /// <summary>
- /// Generate the signature base that is used to produce the signature
- /// </summary>
- /// <param name="url">The full URL that needs to be signed including its non OAuth URL parameters.</param>
- /// <param name="consumerKey">The consumer key.</param>
- /// <param name="token">The token, if available. If not available pass null or an empty string.</param>
- /// <param name="tokenSecret">The token secret, if available. If not available pass null or an empty string.</param>
- /// <param name="verifier">The callback verifier, if available. If not available pass null or an empty string.</param>
- /// <param name="httpMethod">The HTTP method used. Must be a valid HTTP method verb (POST,GET,PUT, etc)</param>
- /// <param name="signatureType">The signature type. To use the default values use <see cref="SignatureType">SignatureType</see>.</param>
- /// <returns>The signature base.</returns>
- private string GenerateSignatureBase (Uri url, string consumerKey, string token, string tokenSecret, string verifier,
- RequestMethod method, TimeSpan timeStamp, string nonce, SignatureType signatureType, out string normalizedUrl,
- out List<IQueryParameter<string>> parameters)
- {
- log.LogDebug ("Generating signature base for OAuth request.");
-
- token = token ?? string.Empty;
- tokenSecret = tokenSecret ?? string.Empty;
- verifier = verifier ?? String.Empty;
-
- if (consumerKey == null) throw new ArgumentNullException ("consumerKey");
-
- log.LogDebug ("URL: {0}", url.Query);
-
- var signatureString = string.Empty;
-
- switch (signatureType) {
- case SignatureType.HMACSHA1:
- signatureString = "HMAC-SHA1";
- break;
- case SignatureType.RSASHA1:
- signatureString = "RSA-SHA1";
- break;
- case SignatureType.PLAINTEXT:
- signatureString = SignatureType.PLAINTEXT.ToString ();
- break;
- }
-
- parameters = GetQueryParameters (url.Query).Concat (new List<IQueryParameter<string>> {
- new QueryParameter<string> (OAuthVersionKey, OAuthVersion, s => string.IsNullOrEmpty (s)),
- new QueryParameter<string> (OAuthTimestampKey, ((long)timeStamp.TotalSeconds).ToString (), s => string.IsNullOrEmpty (s)),
- new QueryParameter<string> (OAuthSignatureMethodKey, signatureString, s => string.IsNullOrEmpty (s)),
- new QueryParameter<string> (OAuthNonceKey, nonce, s => string.IsNullOrEmpty (s)),
- new QueryParameter<string> (OAuthConsumerKeyKey, consumerKey, s => string.IsNullOrEmpty (s))
- }).ToList ();
-
- if (!string.IsNullOrEmpty (token)) parameters.Add (new QueryParameter<string> (OAuthTokenKey, token, s => string.IsNullOrEmpty (s)));
- if (!string.IsNullOrEmpty (verifier)) parameters.Add (new QueryParameter<string> (OAuthVerifierKey, verifier, s => string.IsNullOrEmpty (s)));
-
- log.LogDebug ("Normalizing URL for signature.");
-
- normalizedUrl = string.Format ("{0}://{1}", url.Scheme, url.Host);
- if (!((url.Scheme == "http" && url.Port == 80) || (url.Scheme == "https" && url.Port == 443))) normalizedUrl += ":" + url.Port;
- normalizedUrl += url.AbsolutePath;
-
- log.LogDebug ("Generated normalized URL: {0}", normalizedUrl);
- log.LogDebug ("Normalizing request parameters.");
-
- parameters.Sort ();
- string normalizedRequestParameters = parameters.NormalizeRequestParameters ();
-
- log.LogDebug ("Normalized request parameters {0}.", normalizedRequestParameters);
- log.LogDebug ("Generating signature base from normalized URL and request parameters.");
-
- var signatureBase = new StringBuilder ();
- signatureBase.AppendFormat("{0}&", method.ToString ());
- signatureBase.AppendFormat("{0}&", UrlEncode (normalizedUrl));
- signatureBase.AppendFormat("{0}", UrlEncode (normalizedRequestParameters));
-
- log.LogDebug ("Signature base: {0}", signatureBase.ToString ());
-
- return signatureBase.ToString ();
- }
-
- /// <summary>
- /// Generate the signature value based on the given signature base and hash algorithm.
- /// </summary>
- /// <param name="signatureBase">
- /// The signature based as produced by the GenerateSignatureBase method or by any other means.
- /// </param>
- /// <param name="hash">
- /// The hash algorithm used to perform the hashing. If the hashing algorithm requires
- /// initialization or a key it should be set prior to calling this method.
- /// </param>
- /// <returns>A Base64 string of the hash value.</returns>
- private string GenerateSignatureUsingHash (string signatureBase, HashAlgorithm hash)
- {
- log.LogDebug ("Generating hashed signature.");
- return ComputeHash (hash, signatureBase);
- }
-
- /// <summary>
- /// Generates a signature using the HMAC-SHA1 algorithm
- /// </summary>
- /// <param name="url">The full URL that needs to be signed including its non-OAuth URL parameters.</param>
- /// <param name="consumerKey">The consumer key.</param>
- /// <param name="consumerSecret">The consumer seceret.</param>
- /// <param name="token">The token, if available. If not available pass null or an empty string.</param>
- /// <param name="tokenSecret">The token secret, if available. If not, pass null or an empty string.</param>
- /// <param name="verifier">The callback verifier, if available. If not, pass null or an empty string.</param>
- /// <param name="httpMethod">The HTTP method used. Must be valid HTTP method verb (POST, GET, PUT, etc).</param>
- /// <returns>A Base64 string of the hash value.</returns>
- protected string GenerateSignature (Uri url, string consumerKey, string consumerSecret, string token,
- string tokenSecret, string verifier, RequestMethod method, TimeSpan timeStamp, string nonce, out string normalizedUrl,
- out List<IQueryParameter<string>> parameters)
- {
- log.LogDebug ("Generating signature using HMAC-SHA1 algorithm.");
- return GenerateSignature (url, consumerKey, consumerSecret, token, tokenSecret, verifier, method, timeStamp, nonce,
- SignatureType.HMACSHA1, out normalizedUrl, out parameters);
- }
-
- /// <summary>
- /// Generates a signature using the specified signature type.
- /// </summary>
- /// <param name="url">The full URL that needs to be signed including its non-OAuth URL parameters.</param>
- /// <param name="consumerKey">The consumer key.</param>
- /// <param name="consumerSecret">The consumer seceret.</param>
- /// <param name="token">The token, if available. If not available pass null or an empty string.</param>
- /// <param name="tokenSecret">The token secret, if available. If not, pass null or an empty string.</param>
- /// <param name="verifier">The callback verifier, if available. If not, pass null or an empty string.</param>
- /// <param name="httpMethod">The HTTP method used. Must be a valid HTTP method verb (POST,GET,PUT, etc).</param>
- /// <param name="signatureType">The type of signature to use.</param>
- /// <returns>A Base64 string of the hash value.</returns>
- private string GenerateSignature (Uri url, string consumerKey, string consumerSecret, string token,
- string tokenSecret, string verifier, RequestMethod method, TimeSpan timeStamp, string nonce, SignatureType signatureType,
- out string normalizedUrl, out List<IQueryParameter<string>> parameters)
- {
- log.LogDebug ("Generating signature using signature type {0}", signatureType);
-
- normalizedUrl = null;
- parameters = null;
-
- switch (signatureType)
- {
- case SignatureType.PLAINTEXT:
- var signature = UrlEncode (string.Format ("{0}&{1}", consumerSecret, tokenSecret));
- log.LogDebug ("Plaintext encoding signature {0} of consumer secret and token secret.", signature);
- return signature;
- case SignatureType.HMACSHA1:
- string signatureBase = GenerateSignatureBase (url, consumerKey, token, tokenSecret, verifier, method,
- timeStamp, nonce, SignatureType.HMACSHA1, out normalizedUrl, out parameters);
-
- var hmacsha1 = new HMACSHA1 ();
- hmacsha1.Key = Encoding.ASCII.GetBytes (string.Format ("{0}&{1}",
- UrlEncode (consumerSecret),
- string.IsNullOrEmpty (tokenSecret) ? "" : UrlEncode(tokenSecret)));
-
- var hashedSignature = GenerateSignatureUsingHash (signatureBase, hmacsha1);
-
- log.LogDebug ("HMAC-SHA1 encoded signature {0} of consumer secret and token secret.", hashedSignature);
- return hashedSignature;
- case SignatureType.RSASHA1:
- throw new NotImplementedException ();
- default:
- throw new ArgumentException ("Unknown signature type", "signatureType");
- }
- }
-
- /// <summary>
- /// Generate the timestamp for the signature.
- /// </summary>
- /// <returns>A string timestamp.</returns>
- protected TimeSpan GenerateTimeStamp ()
- {
- log.LogDebug ("Generating time stamp.");
- // Default implementation of UNIX time of the current UTC time
- return DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
- }
-
- /// <summary>
- /// Generate a nonce.
- /// </summary>
- /// <returns>A random nonce string.</returns>
- protected virtual string GenerateNonce()
- {
- log.LogDebug ("Generating nonce.");
- // Just a simple implementation of a random number between 123400 and 9999999
- return random.Next (123400, 9999999).ToString ();
- }
- }
+//
+// OAuthBase.cs
+//
+// Author:
+// Bojan Rajkovic <bojanr brandeis edu>
+// Shannon Whitley <swhitley whitleymedia com>
+// Eran Sandler <http://eran.sandler.co.il/>
+// Sandy Armstrong <sanfordarmstrong gmail com>
+//
+// Copyright (c) 2009 Bojan Rajkovic
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using OAuth;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using System.Web;
+
+namespace OAuth
+{
+ /// <summary>
+ /// Provides a base class for OAuth authentication and signing.
+ /// </summary>
+ public class Base
+ {
+ class LoggerAdapter
+ {
+ public void LogDebug (string format, params object[] objects)
+ {
+ if (Debugging)
+ Tomboy.Logger.Debug (format, objects);
+ }
+
+ public bool Debugging { get; set; }
+ }
+
+ private readonly LoggerAdapter log = new LoggerAdapter ();
+ private bool debugging;
+
+ public bool Debugging
+ {
+ get { return debugging; }
+ set { debugging = value; log.Debugging = value; }
+ }
+
+ private const string OAuthVersion = "1.0";
+
+ //
+ // List of know and used oauth parameters' names
+ //
+ private const string OAuthConsumerKeyKey = "oauth_consumer_key";
+ private const string OAuthCallbackKey = "oauth_callback";
+ private const string OAuthVersionKey = "oauth_version";
+ private const string OAuthSignatureMethodKey = "oauth_signature_method";
+ private const string OAuthSignatureKey = "oauth_signature";
+ private const string OAuthTimestampKey = "oauth_timestamp";
+ private const string OAuthNonceKey = "oauth_nonce";
+ private const string OAuthTokenKey = "oauth_token";
+ private const string OAuthTokenSecretKey = "oauth_token_secret";
+ private const string OAuthVerifierKey = "oauth_verifier";
+
+ private const string HMACSHA1SignatureType = "HMAC-SHA1";
+ private const string PlainTextSignatureType = "PLAINTEXT";
+ private const string RSASHA1SignatureType = "RSA-SHA1";
+
+ private Random random = new Random ();
+
+ private string unreservedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~";
+
+ /// <summary>
+ /// Helper function to compute a hash value.
+ /// </summary>
+ /// <param name="hashAlgorithm">
+ /// The hashing algoirhtm used. If that algorithm needs some initialization, like HMAC and its derivatives,
+ /// they should be initialized prior to passing it to this function.
+ /// </param>
+ /// <param name="data">The data to hash.</param>
+ /// <returns>A Base64 string of the hash value.</returns>
+ private string ComputeHash (HashAlgorithm hashAlgorithm, string data)
+ {
+ log.LogDebug ("Computing hash for data {0}", data);
+
+ if (hashAlgorithm == null) throw new ArgumentNullException ("hashAlgorithm");
+ if (string.IsNullOrEmpty (data)) throw new ArgumentNullException ("data");
+
+ byte[] dataBuffer = System.Text.Encoding.ASCII.GetBytes (data);
+ byte[] hashBytes = hashAlgorithm.ComputeHash (dataBuffer);
+
+ return Convert.ToBase64String (hashBytes);
+ }
+
+ /// <summary>
+ /// URL encodes a string using OAuth's encoding scheme (slightly different from HttpUtility's UrlEncode).
+ /// </summary>
+ /// <param name="value">The string to URL encode.</param>
+ /// <returns>An URL encoded string.</returns>
+ private string UrlEncode (string value)
+ {
+ log.LogDebug ("URL encoding value.");
+ var result = new StringBuilder ();
+
+ foreach (char symbol in value) {
+ if (unreservedChars.IndexOf(symbol) != -1) result.Append(symbol);
+ else result.Append('%' + String.Format("{0:X2}", (int)symbol));
+ }
+
+ return result.ToString();
+ }
+
+ /// <summary>
+ /// Internal function to cut out all non oauth query string parameters.
+ /// </summary>
+ /// <param name="parameters">The query string part of the URL.</param>
+ /// <returns>A list of QueryParameter each containing the parameter name and value.</returns>
+ private IEnumerable<IQueryParameter<string>> GetQueryParameters (string parameters)
+ {
+ log.LogDebug ("Creating list of parameters from parameter string {0}", parameters);
+
+ return CreateQueryParametersIterator (parameters);
+ }
+
+ private IEnumerable<IQueryParameter<string>> CreateQueryParametersIterator (string parameters)
+ {
+ if (parameters == null) throw new ArgumentNullException ("parameters");
+ var parameterDictionary = HttpUtility.ParseQueryString (parameters).ToDictionary ();
+
+ foreach (var kvp in parameterDictionary)
+ yield return new QueryParameter<string> (kvp.Key, kvp.Value, s => string.IsNullOrEmpty (s));
+ }
+
+ /// <summary>
+ /// Generate the signature base that is used to produce the signature
+ /// </summary>
+ /// <param name="url">The full URL that needs to be signed including its non OAuth URL parameters.</param>
+ /// <param name="consumerKey">The consumer key.</param>
+ /// <param name="token">The token, if available. If not available pass null or an empty string.</param>
+ /// <param name="tokenSecret">The token secret, if available. If not available pass null or an empty string.</param>
+ /// <param name="verifier">The callback verifier, if available. If not available pass null or an empty string.</param>
+ /// <param name="httpMethod">The HTTP method used. Must be a valid HTTP method verb (POST,GET,PUT, etc)</param>
+ /// <param name="signatureType">The signature type. To use the default values use <see cref="SignatureType">SignatureType</see>.</param>
+ /// <returns>The signature base.</returns>
+ private string GenerateSignatureBase (Uri url, string consumerKey, string token, string tokenSecret, string verifier,
+ RequestMethod method, TimeSpan timeStamp, string nonce, SignatureType signatureType, out string normalizedUrl,
+ out List<IQueryParameter<string>> parameters)
+ {
+ log.LogDebug ("Generating signature base for OAuth request.");
+
+ token = token ?? string.Empty;
+ tokenSecret = tokenSecret ?? string.Empty;
+ verifier = verifier ?? String.Empty;
+
+ if (consumerKey == null) throw new ArgumentNullException ("consumerKey");
+
+ log.LogDebug ("URL: {0}", url.Query);
+
+ var signatureString = string.Empty;
+
+ switch (signatureType) {
+ case SignatureType.HMACSHA1:
+ signatureString = "HMAC-SHA1";
+ break;
+ case SignatureType.RSASHA1:
+ signatureString = "RSA-SHA1";
+ break;
+ case SignatureType.PLAINTEXT:
+ signatureString = SignatureType.PLAINTEXT.ToString ();
+ break;
+ }
+
+ parameters = GetQueryParameters (url.Query).Concat (new List<IQueryParameter<string>> {
+ new QueryParameter<string> (OAuthVersionKey, OAuthVersion, s => string.IsNullOrEmpty (s)),
+ new QueryParameter<string> (OAuthTimestampKey, ((long)timeStamp.TotalSeconds).ToString (), s => string.IsNullOrEmpty (s)),
+ new QueryParameter<string> (OAuthSignatureMethodKey, signatureString, s => string.IsNullOrEmpty (s)),
+ new QueryParameter<string> (OAuthNonceKey, nonce, s => string.IsNullOrEmpty (s)),
+ new QueryParameter<string> (OAuthConsumerKeyKey, consumerKey, s => string.IsNullOrEmpty (s))
+ }).ToList ();
+
+ if (!string.IsNullOrEmpty (token)) parameters.Add (new QueryParameter<string> (OAuthTokenKey, token, s => string.IsNullOrEmpty (s)));
+ if (!string.IsNullOrEmpty (verifier)) parameters.Add (new QueryParameter<string> (OAuthVerifierKey, verifier, s => string.IsNullOrEmpty (s)));
+
+ log.LogDebug ("Normalizing URL for signature.");
+
+ normalizedUrl = string.Format ("{0}://{1}", url.Scheme, url.Host);
+ if (!((url.Scheme == "http" && url.Port == 80) || (url.Scheme == "https" && url.Port == 443))) normalizedUrl += ":" + url.Port;
+ normalizedUrl += url.AbsolutePath;
+
+ log.LogDebug ("Generated normalized URL: {0}", normalizedUrl);
+ log.LogDebug ("Normalizing request parameters.");
+
+ parameters.Sort ();
+ string normalizedRequestParameters = parameters.NormalizeRequestParameters ();
+
+ log.LogDebug ("Normalized request parameters {0}.", normalizedRequestParameters);
+ log.LogDebug ("Generating signature base from normalized URL and request parameters.");
+
+ var signatureBase = new StringBuilder ();
+ signatureBase.AppendFormat("{0}&", method.ToString ());
+ signatureBase.AppendFormat("{0}&", UrlEncode (normalizedUrl));
+ signatureBase.AppendFormat("{0}", UrlEncode (normalizedRequestParameters));
+
+ log.LogDebug ("Signature base: {0}", signatureBase.ToString ());
+
+ return signatureBase.ToString ();
+ }
+
+ /// <summary>
+ /// Generate the signature value based on the given signature base and hash algorithm.
+ /// </summary>
+ /// <param name="signatureBase">
+ /// The signature based as produced by the GenerateSignatureBase method or by any other means.
+ /// </param>
+ /// <param name="hash">
+ /// The hash algorithm used to perform the hashing. If the hashing algorithm requires
+ /// initialization or a key it should be set prior to calling this method.
+ /// </param>
+ /// <returns>A Base64 string of the hash value.</returns>
+ private string GenerateSignatureUsingHash (string signatureBase, HashAlgorithm hash)
+ {
+ log.LogDebug ("Generating hashed signature.");
+ return ComputeHash (hash, signatureBase);
+ }
+
+ /// <summary>
+ /// Generates a signature using the HMAC-SHA1 algorithm
+ /// </summary>
+ /// <param name="url">The full URL that needs to be signed including its non-OAuth URL parameters.</param>
+ /// <param name="consumerKey">The consumer key.</param>
+ /// <param name="consumerSecret">The consumer seceret.</param>
+ /// <param name="token">The token, if available. If not available pass null or an empty string.</param>
+ /// <param name="tokenSecret">The token secret, if available. If not, pass null or an empty string.</param>
+ /// <param name="verifier">The callback verifier, if available. If not, pass null or an empty string.</param>
+ /// <param name="httpMethod">The HTTP method used. Must be valid HTTP method verb (POST, GET, PUT, etc).</param>
+ /// <returns>A Base64 string of the hash value.</returns>
+ protected string GenerateSignature (Uri url, string consumerKey, string consumerSecret, string token,
+ string tokenSecret, string verifier, RequestMethod method, TimeSpan timeStamp, string nonce, out string normalizedUrl,
+ out List<IQueryParameter<string>> parameters)
+ {
+ log.LogDebug ("Generating signature using HMAC-SHA1 algorithm.");
+ return GenerateSignature (url, consumerKey, consumerSecret, token, tokenSecret, verifier, method, timeStamp, nonce,
+ SignatureType.HMACSHA1, out normalizedUrl, out parameters);
+ }
+
+ /// <summary>
+ /// Generates a signature using the specified signature type.
+ /// </summary>
+ /// <param name="url">The full URL that needs to be signed including its non-OAuth URL parameters.</param>
+ /// <param name="consumerKey">The consumer key.</param>
+ /// <param name="consumerSecret">The consumer seceret.</param>
+ /// <param name="token">The token, if available. If not available pass null or an empty string.</param>
+ /// <param name="tokenSecret">The token secret, if available. If not, pass null or an empty string.</param>
+ /// <param name="verifier">The callback verifier, if available. If not, pass null or an empty string.</param>
+ /// <param name="httpMethod">The HTTP method used. Must be a valid HTTP method verb (POST,GET,PUT, etc).</param>
+ /// <param name="signatureType">The type of signature to use.</param>
+ /// <returns>A Base64 string of the hash value.</returns>
+ private string GenerateSignature (Uri url, string consumerKey, string consumerSecret, string token,
+ string tokenSecret, string verifier, RequestMethod method, TimeSpan timeStamp, string nonce, SignatureType signatureType,
+ out string normalizedUrl, out List<IQueryParameter<string>> parameters)
+ {
+ log.LogDebug ("Generating signature using signature type {0}", signatureType);
+
+ normalizedUrl = null;
+ parameters = null;
+
+ switch (signatureType)
+ {
+ case SignatureType.PLAINTEXT:
+ var signature = UrlEncode (string.Format ("{0}&{1}", consumerSecret, tokenSecret));
+ log.LogDebug ("Plaintext encoding signature {0} of consumer secret and token secret.", signature);
+ return signature;
+ case SignatureType.HMACSHA1:
+ string signatureBase = GenerateSignatureBase (url, consumerKey, token, tokenSecret, verifier, method,
+ timeStamp, nonce, SignatureType.HMACSHA1, out normalizedUrl, out parameters);
+
+ var hmacsha1 = new HMACSHA1 ();
+ hmacsha1.Key = Encoding.ASCII.GetBytes (string.Format ("{0}&{1}",
+ UrlEncode (consumerSecret),
+ string.IsNullOrEmpty (tokenSecret) ? "" : UrlEncode(tokenSecret)));
+
+ var hashedSignature = GenerateSignatureUsingHash (signatureBase, hmacsha1);
+
+ log.LogDebug ("HMAC-SHA1 encoded signature {0} of consumer secret and token secret.", hashedSignature);
+ return hashedSignature;
+ case SignatureType.RSASHA1:
+ throw new NotImplementedException ();
+ default:
+ throw new ArgumentException ("Unknown signature type", "signatureType");
+ }
+ }
+
+ /// <summary>
+ /// Generate the timestamp for the signature.
+ /// </summary>
+ /// <returns>A string timestamp.</returns>
+ protected TimeSpan GenerateTimeStamp ()
+ {
+ log.LogDebug ("Generating time stamp.");
+ // Default implementation of UNIX time of the current UTC time
+ return DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
+ }
+
+ /// <summary>
+ /// Generate a nonce.
+ /// </summary>
+ /// <returns>A random nonce string.</returns>
+ protected virtual string GenerateNonce()
+ {
+ log.LogDebug ("Generating nonce.");
+ // Just a simple implementation of a random number between 123400 and 9999999
+ return random.Next (123400, 9999999).ToString ();
+ }
+ }
}
\ No newline at end of file
diff --git a/Tomboy/Addins/WebSyncService/OAuth/QueryParameter.cs b/Tomboy/Addins/WebSyncService/OAuth/QueryParameter.cs
index f888959..eea7ff0 100644
--- a/Tomboy/Addins/WebSyncService/OAuth/QueryParameter.cs
+++ b/Tomboy/Addins/WebSyncService/OAuth/QueryParameter.cs
@@ -1,204 +1,204 @@
-//
-// QueryParameter.cs
-//
-// Author:
-// Bojan Rajkovic <bojanr brandeis edu>
-//
-// Copyright (c) 2009 Bojan Rajkovic
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-
-namespace OAuth
-{
- /// <summary>
- /// A common interface for query parameters to create lists.
- /// </summary>
- public interface IQueryParameter<T> : IComparable<IQueryParameter<T>>, IEquatable<IQueryParameter<T>>
- {
- string Name
- {
- get;
- }
-
- T Value
- {
- get;
- }
- }
-
- public interface IQueryParameter
- {
- string Name
- {
- get;
- }
-
- object Value
- {
- get;
- }
- }
-
- /// <summary>
- /// Provides a structure to hold query parameters for easier query string building.
- /// </summary>
- public class QueryParameter<T> : IQueryParameter, IQueryParameter<T>, IEquatable<QueryParameter<T>>, IComparable<QueryParameter<T>>
- where T : IComparable<T>, IEquatable<T>
- {
- private T _value;
-
- /// <summary>
- /// Creates an instance of the QueryParameter object.
- /// </summary>
- /// <param name="name">The parameter name.</param>
- /// <param name="value">The parameter value.</param>
- /// <param name="omitCondition">The condition under which to omit the parameter.</param>
- public QueryParameter (string name, T value, Predicate<T> omitCondition)
- {
- if (string.IsNullOrEmpty (name)) throw new ArgumentNullException ("name");
-
- Name = name;
- _value = value;
- Omit = omitCondition;
- }
-
- /// <summary>
- /// The condition under which to omit the QueryParameter.
- /// </summary>
- public Predicate<T> Omit
- {
- get;
- private set;
- }
-
- object IQueryParameter.Value
- {
- get { return _value; }
- }
-
- /// <summary>
- /// The parameter name.
- /// </summary>
- public string Name
- {
- get;
- private set;
- }
-
- /// <summary>
- /// The parameter value.
- /// </summary>
- public T Value
- {
- get { return _value; }
- private set { _value = value; }
- }
-
- /// <summary>
- /// Creates a string that represents the query parameter (or omits it if the omit condition is met).
- /// </summary>
- /// <returns></returns>
- public override string ToString ()
- {
- if (Omit (_value)) return null;
- else return string.Format ("{0}={1}", Name, _value);
- }
-
- public bool Equals (IQueryParameter<T> other)
- {
- return Equals ((QueryParameter<T>) other);
- }
-
- public int CompareTo (IQueryParameter<T> other)
- {
- return CompareTo ((QueryParameter<T>) other);
- }
-
- /// <summary>
- /// Check if this QueryParameter instance is equal to another.
- /// </summary>
- /// <param name="other">The other query parameter instance.</param>
- /// <returns>True if the objects are equal, false otherwise.</returns>
- public bool Equals (QueryParameter<T> other)
- {
- return string.Equals (other.Name, Name, StringComparison.OrdinalIgnoreCase)
- ? EqualityComparer<T>.Default.Equals (other.Value, _value)
- : false;
- }
-
- /// <summary>
- /// Compares this QueryParameter instance to another.
- /// </summary>
- /// <param name="other">The other QueryParameter.</param>
- /// <returns>-1 if this instance is to be sorted after, 0 if they are equal, 1 if this one is to be sorted before.</returns>
- public int CompareTo (QueryParameter<T> other)
- {
- var value = string.Compare (Name, other.Name, StringComparison.OrdinalIgnoreCase);
- return value == 0 ? Comparer<T>.Default.Compare (_value, other.Value) : value;
- }
-
- /// <summary>
- /// Compares this object to another for equality.
- /// </summary>
- /// <param name="obj">The other object.</param>
- /// <returns>True if they are the same, false otherwise.</returns>
- public override bool Equals (object obj)
- {
- if (obj == null)
- throw new ArgumentNullException ("obj");
- if (obj is QueryParameter<T>)
- return Equals ((QueryParameter<T>) obj);
- else throw new ArgumentException ("obj is not a QueryParameter<T>.", "obj");
- }
-
- /// <summary>
- /// Gets the hash code for this QueryParameter instance.
- /// </summary>
- /// <returns>The hash code.</returns>
- public override int GetHashCode ()
- {
- return Name.GetHashCode () ^ _value.GetHashCode ();
- }
-
- /// <summary>
- /// Checks if two instances of <see cref="QueryParameter{T}">QueryParameter<T></see> are equal.
- /// </summary>
- /// <param name="lhs">One instance.</param>
- /// <param name="rhs">The other instance.</param>
- /// <returns>True if they are same, false otherwise.</returns>
- public static bool operator == (QueryParameter<T> lhs, QueryParameter<T> rhs)
- {
- return lhs.Equals (rhs);
- }
-
- /// <summary>
- /// Checks if two instances of <see cref="QueryParameter{T}">QueryParameter<T></see> are not equal.
- /// </summary>
- /// <param name="lhs">One instance.</param>
- /// <param name="rhs">The other instance.</param>
- /// <returns>True if they are different, false otherwise.</returns>
- public static bool operator != (QueryParameter<T> lhs, QueryParameter<T> rhs)
- {
- return !(lhs == rhs);
- }
- }
-}
+//
+// QueryParameter.cs
+//
+// Author:
+// Bojan Rajkovic <bojanr brandeis edu>
+//
+// Copyright (c) 2009 Bojan Rajkovic
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+
+namespace OAuth
+{
+ /// <summary>
+ /// A common interface for query parameters to create lists.
+ /// </summary>
+ public interface IQueryParameter<T> : IComparable<IQueryParameter<T>>, IEquatable<IQueryParameter<T>>
+ {
+ string Name
+ {
+ get;
+ }
+
+ T Value
+ {
+ get;
+ }
+ }
+
+ public interface IQueryParameter
+ {
+ string Name
+ {
+ get;
+ }
+
+ object Value
+ {
+ get;
+ }
+ }
+
+ /// <summary>
+ /// Provides a structure to hold query parameters for easier query string building.
+ /// </summary>
+ public class QueryParameter<T> : IQueryParameter, IQueryParameter<T>, IEquatable<QueryParameter<T>>, IComparable<QueryParameter<T>>
+ where T : IComparable<T>, IEquatable<T>
+ {
+ private T _value;
+
+ /// <summary>
+ /// Creates an instance of the QueryParameter object.
+ /// </summary>
+ /// <param name="name">The parameter name.</param>
+ /// <param name="value">The parameter value.</param>
+ /// <param name="omitCondition">The condition under which to omit the parameter.</param>
+ public QueryParameter (string name, T value, Predicate<T> omitCondition)
+ {
+ if (string.IsNullOrEmpty (name)) throw new ArgumentNullException ("name");
+
+ Name = name;
+ _value = value;
+ Omit = omitCondition;
+ }
+
+ /// <summary>
+ /// The condition under which to omit the QueryParameter.
+ /// </summary>
+ public Predicate<T> Omit
+ {
+ get;
+ private set;
+ }
+
+ object IQueryParameter.Value
+ {
+ get { return _value; }
+ }
+
+ /// <summary>
+ /// The parameter name.
+ /// </summary>
+ public string Name
+ {
+ get;
+ private set;
+ }
+
+ /// <summary>
+ /// The parameter value.
+ /// </summary>
+ public T Value
+ {
+ get { return _value; }
+ private set { _value = value; }
+ }
+
+ /// <summary>
+ /// Creates a string that represents the query parameter (or omits it if the omit condition is met).
+ /// </summary>
+ /// <returns></returns>
+ public override string ToString ()
+ {
+ if (Omit (_value)) return null;
+ else return string.Format ("{0}={1}", Name, _value);
+ }
+
+ public bool Equals (IQueryParameter<T> other)
+ {
+ return Equals ((QueryParameter<T>) other);
+ }
+
+ public int CompareTo (IQueryParameter<T> other)
+ {
+ return CompareTo ((QueryParameter<T>) other);
+ }
+
+ /// <summary>
+ /// Check if this QueryParameter instance is equal to another.
+ /// </summary>
+ /// <param name="other">The other query parameter instance.</param>
+ /// <returns>True if the objects are equal, false otherwise.</returns>
+ public bool Equals (QueryParameter<T> other)
+ {
+ return string.Equals (other.Name, Name, StringComparison.OrdinalIgnoreCase)
+ ? EqualityComparer<T>.Default.Equals (other.Value, _value)
+ : false;
+ }
+
+ /// <summary>
+ /// Compares this QueryParameter instance to another.
+ /// </summary>
+ /// <param name="other">The other QueryParameter.</param>
+ /// <returns>-1 if this instance is to be sorted after, 0 if they are equal, 1 if this one is to be sorted before.</returns>
+ public int CompareTo (QueryParameter<T> other)
+ {
+ var value = string.Compare (Name, other.Name, StringComparison.OrdinalIgnoreCase);
+ return value == 0 ? Comparer<T>.Default.Compare (_value, other.Value) : value;
+ }
+
+ /// <summary>
+ /// Compares this object to another for equality.
+ /// </summary>
+ /// <param name="obj">The other object.</param>
+ /// <returns>True if they are the same, false otherwise.</returns>
+ public override bool Equals (object obj)
+ {
+ if (obj == null)
+ throw new ArgumentNullException ("obj");
+ if (obj is QueryParameter<T>)
+ return Equals ((QueryParameter<T>) obj);
+ else throw new ArgumentException ("obj is not a QueryParameter<T>.", "obj");
+ }
+
+ /// <summary>
+ /// Gets the hash code for this QueryParameter instance.
+ /// </summary>
+ /// <returns>The hash code.</returns>
+ public override int GetHashCode ()
+ {
+ return Name.GetHashCode () ^ _value.GetHashCode ();
+ }
+
+ /// <summary>
+ /// Checks if two instances of <see cref="QueryParameter{T}">QueryParameter<T></see> are equal.
+ /// </summary>
+ /// <param name="lhs">One instance.</param>
+ /// <param name="rhs">The other instance.</param>
+ /// <returns>True if they are same, false otherwise.</returns>
+ public static bool operator == (QueryParameter<T> lhs, QueryParameter<T> rhs)
+ {
+ return lhs.Equals (rhs);
+ }
+
+ /// <summary>
+ /// Checks if two instances of <see cref="QueryParameter{T}">QueryParameter<T></see> are not equal.
+ /// </summary>
+ /// <param name="lhs">One instance.</param>
+ /// <param name="rhs">The other instance.</param>
+ /// <returns>True if they are different, false otherwise.</returns>
+ public static bool operator != (QueryParameter<T> lhs, QueryParameter<T> rhs)
+ {
+ return !(lhs == rhs);
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]