Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Core/ServiceObjects/Items/Booking.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Exchange Web Services Managed API
*
* Copyright (c) Microsoft Corporation
* All rights reserved.
*
* MIT License
*
* 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.
*/

namespace Microsoft.Exchange.WebServices.Data
{
using System;

[Attachable]
[ServiceObjectDefinition(XmlElementNames.Booking)]
public class Booking : Appointment
{
public Booking(ExchangeService service)
: base(service)
{
}
}
}
7 changes: 7 additions & 0 deletions Core/ServiceObjects/ServiceObjectInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ private void InitializeServiceObjectClassMap()
delegate(ExchangeService srv) { return new Appointment(srv); },
delegate(ItemAttachment itemAttachment, bool isNew) { return new Appointment(itemAttachment, isNew); });

// Booking
this.AddServiceObjectType(
XmlElementNames.Booking,
typeof(Booking),
delegate (ExchangeService srv) { return new Booking(srv); },
delegate (ItemAttachment itemAttachment, bool isNew) { return new Appointment(itemAttachment, isNew); });

// CalendarFolder
this.AddServiceObjectType(
XmlElementNames.CalendarFolder,
Expand Down
1 change: 1 addition & 0 deletions Core/XmlElementNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ internal static class XmlElementNames
public const string AccessLevel = "AccessLevel";
public const string Presenters = "Presenters";
public const string CalendarItem = "CalendarItem";
public const string Booking = "Booking";
public const string CalendarFolder = "CalendarFolder";
public const string Attendee = "Attendee";
public const string ResponseType = "ResponseType";
Expand Down
23 changes: 3 additions & 20 deletions Microsoft.Exchange.WebServices.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<Compile Include="Core\Responses\GetUserPhotoResponse.cs" />
<Compile Include="Core\Responses\SetOMEConfigurationResponse.cs" />
<Compile Include="Core\Responses\RegisterConsentResponse.cs" />
<Compile Include="Core\ServiceObjects\Items\Booking.cs" />
<Compile Include="Credentials\DualAuthCredentials.cs" />
<Compile Include="Enumerations\ConsentState.cs" />
<Compile Include="Enumerations\GetUserPhotoStatus.cs" />
Expand Down Expand Up @@ -879,41 +880,23 @@
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. -->
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">

<ParameterGroup>

<Url ParameterType="System.String" Required="true" />

<FileName ParameterType="System.String" Required="true" />

</ParameterGroup>

<Task>

<Reference Include="System" />

<Code Type="Fragment" Language="cs">
<![CDATA[
<Code Type="Fragment" Language="cs"><![CDATA[

new System.Net.WebClient().DownloadFile(Url, FileName);

]]>
</Code>

]]></Code>
</Task>

</UsingTask>

<Target Name="AfterBuild" Condition="'$(Configuration)' == 'Release'">

<!-- Download nuget.exe if we need it -->

<DownloadFile Condition="!Exists('$(OutputPath)\nuget.exe')" FileName="$(OutputPath)\nuget.exe" Url="https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" />

<!-- Pack up a nuget package -->

<Exec Command="$(OutputPath)\nuget pack $(ProjectFileName) -Properties Configuration=Release -Symbols -OutputDirectory $(OutputPath) -IncludeReferencedProjects" />

</Target>

</Project>