Skip to content

Commit

Permalink
Adding Fix for missing Booking support from Issues OfficeDev#295 fix …
Browse files Browse the repository at this point in the history
…by SchultzAndreas from 25-03-2023. This will be Beta5
  • Loading branch information
jbennink committed May 6, 2024
1 parent a5c2333 commit 35b24bc
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ bld/
[Bb]in/
[Oo]bj/

# Visual Studio 2015 cache/options directory
.vs/

# Roslyn cache directories
*.ide/

Expand Down
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
30 changes: 15 additions & 15 deletions Microsoft.Exchange.WebServices.NETStandard.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>2.0.0</VersionPrefix>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.Exchange.WebServices.NETStandard</AssemblyName>
<PackageId>Microsoft.Exchange.WebServices.NETStandard</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand All @@ -26,7 +26,7 @@ restored ldap autodiscover functionality
merged changes from official Microsoft repository
added cancellation token for most of methods
</PackageReleaseNotes>
<Version>2.0.0-beta2</Version>
<Version>2.0.0-beta5</Version>
<PackageLicenseFile>license.txt</PackageLicenseFile>
</PropertyGroup>

Expand All @@ -35,28 +35,28 @@ added cancellation token for most of methods
<Reference Include="System.Security" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Security.Cryptography.Xml">
<Version>4.7.0</Version>
</PackageReference>
</ItemGroup>

</ItemGroup>

<ItemGroup>
<Compile Remove="Credentials\BasicAuthModuleForUTF8.cs" />
</ItemGroup>

</ItemGroup>

<ItemGroup>
<PackageReference Include="System.DirectoryServices" Version="4.7.0" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>

</ItemGroup>

<ItemGroup>
<None Include="license.txt">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>
</ItemGroup>

</Project>

0 comments on commit 35b24bc

Please sign in to comment.