Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f91e26c
Merge pull request #138 from rykoma/master
davster Dec 30, 2017
582f631
Added nupsec
MIchaelMainer Feb 27, 2018
f033a57
Merge pull request #159 from OfficeDev/addNuspec
davster Feb 27, 2018
d7605d5
Merge pull request #135 from LoungeFlyZ/master
davster Feb 27, 2018
65da149
Merge pull request #134 from Blackbaud-BobbyEarl/master
davster Feb 27, 2018
6f30098
Merge pull request #130 from cBrain-dk/public-streamingsubscription-ctor
davster Feb 27, 2018
ec943da
Merge pull request #114 from helgesson/master
davster Feb 27, 2018
0bf6300
Merge pull request #100 from VasiliyZhushma/master
davster Feb 27, 2018
a320949
Fix #163: ApplyConversationAction Multiple Items Bug
Mar 7, 2018
5eefd0a
Merge pull request #164 from avereshchak/conversation-group-action-bug
davster Mar 8, 2018
8b33c1e
Proxy should be copied from template service
Mar 19, 2018
ddf92e1
Make XmlDtdException serializable
poizan42 Nov 1, 2017
9da2158
Added DualAuthCredentials to manage dual auth with CBA + basic auth
Ashishks1987 Apr 5, 2018
5ae8fac
Merge pull request #185 from ibiernacki/InstallAppResponse_WasFirstIn…
davster May 1, 2018
831ba83
Merge pull request #184 from ibiernacki/InstallAppRequest_EndElementS…
davster May 1, 2018
472beb5
Merge pull request #173 from cBrain-dk/XmlDtdException-ser-dtor
davster May 1, 2018
e69923f
Merge pull request #167 from szogun1987/bugfix/proxy_should_be_cloned…
davster May 1, 2018
3ab9637
Merge pull request #180 from Ashishks1987/feature/Dual-Auth
davster May 1, 2018
5c420ed
If the time zone info doesn't support Daylight Saving Time for a spec…
May 2, 2018
01301b4
Add missing enum value for phoneNumberKey
davster Jul 5, 2018
eba2869
Merge pull request #195 from OfficeDev/users/davster/AddPhoneNumberKe…
davster Jul 5, 2018
0298195
Update README.md
yinaa Jul 25, 2018
f186b48
Update README.md
yinaa Jul 25, 2018
f93c38d
Update README.md
yinaa Jul 25, 2018
a5ada0a
Merge pull request #20 from PaulDMendoza/master
sherlock1982 Sep 1, 2018
aeb054a
get back ldap autodiscover
sherlock1982 Sep 1, 2018
a9d5ffd
Merge branch 'master' of https://github.com/OfficeDev/ews-managed-api
sherlock1982 Sep 2, 2018
00f2f5f
added CancellationToken for most of methods
sherlock1982 Sep 2, 2018
81a33de
more missing token support
sherlock1982 Sep 2, 2018
9c068f1
Handling empty Content-Encoding header
Annosz May 11, 2020
68122e6
orkunakca Nov 20, 2020
9b9a005
Merge pull request #52 from orkunakca/Fix_TheContentType_Text-Plain_W…
sherlock1982 Jan 29, 2021
906f5c9
Merge pull request #49 from Annosz/master
sherlock1982 Jan 29, 2021
23cce19
added license file, updated some dependencies
Jan 29, 2021
084929a
Auto correct of VS for Mac
StrictLine May 30, 2021
bf6b43d
Working implementation of Load(Stream stream) and Load(string fileName)
StrictLine May 30, 2021
6f7e5ea
Update .gitignore
StrictLine May 30, 2021
fec7667
Merge branch project settings and gitignore
StrictLine May 30, 2021
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,8 @@ UpgradeLog*.htm
FakesAssemblies/
/project.lock.json
/.svn

# VS for Mac
mono_crash.*.json
UserPrefs.xml
project-cache/
34 changes: 17 additions & 17 deletions ComplexProperties/FileAttachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,17 @@ internal override void WriteElementsToXml(EwsServiceXmlWriter writer)
/// <param name="stream">The stream to load the content of the attachment into.</param>
public async System.Threading.Tasks.Task Load(Stream stream)
{
this.loadToStream = stream;

// TODO: content/contentStream should be removed or should reference to underlying value
try
{
// 1) Load attachment from EWS
await this.Load();

// 2) Write content to stream
stream.Write(Content, 0, Content.Length);
}
finally
{
this.loadToStream = null;
}
}

Expand All @@ -207,21 +209,19 @@ public async System.Threading.Tasks.Task Load(Stream stream)
/// <param name="fileName">The name of the file to load the content of the attachment into. If the file already exists, it is overwritten.</param>
public async System.Threading.Tasks.Task Load(string fileName)
{
this.loadToStream = new FileStream(fileName, FileMode.Create);

try
{
await this.Load();
}
finally
{
this.loadToStream.Dispose();
this.loadToStream = null;
}
using(var fileStream = new FileStream(fileName, FileMode.Create))
try
{
// 1) Load attachment from EWS
await this.Load();

// 2) Write content to file
fileStream.Write(Content, 0, Content.Length);
}
finally
{
}

this.fileName = fileName;
this.content = null;
this.contentStream = null;
}

/// <summary>
Expand Down
101 changes: 52 additions & 49 deletions Microsoft.Exchange.WebServices.NETStandard.csproj
Original file line number Diff line number Diff line change
@@ -1,62 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>2.0.0</VersionPrefix>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<AssemblyName>Microsoft.Exchange.WebServices.NETStandard</AssemblyName>
<PackageId>Microsoft.Exchange.WebServices.NETStandard</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>sherlock1982</Authors>
<RepositoryUrl>https://github.com/sherlock1982/ews-managed-api</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>ews exchange office365 Microsoft Web API Email Client Library C#</PackageTags>
<PackageProjectUrl>https://github.com/sherlock1982/ews-managed-api</PackageProjectUrl>
<Title>Microsoft.Exchange.WebServices.NETStandard</Title>
<Description>The Exchange Web Services (EWS) Managed API provides a managed interface for developing .NET client applications that use EWS. By using the EWS Managed API, you can access almost all the information stored in an Office 365, Exchange Online, or Exchange Server mailbox.</Description>
<PackageReleaseNotes>removed obsolete WebRequests and switched to HttpClient internally
fixed issue with file attachements downloads
restored ldap autodiscover functionality
merged changes from official Microsoft repository
added cancellation token for most of methods
</PackageReleaseNotes>
<Version>2.0.0-beta2</Version>
<PackageLicenseFile>license.txt</PackageLicenseFile>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System.Xml" />
<Reference Include="System.Security" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<PropertyGroup>
<VersionPrefix>2.0.0</VersionPrefix>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<AssemblyName>Microsoft.Exchange.WebServices.NETStandard</AssemblyName>
<PackageId>Microsoft.Exchange.WebServices.NETStandard</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>sherlock1982</Authors>
<RepositoryUrl>https://github.com/sherlock1982/ews-managed-api</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>ews exchange office365 Microsoft Web API Email Client Library C#</PackageTags>
<PackageProjectUrl>https://github.com/sherlock1982/ews-managed-api</PackageProjectUrl>
<Title>Microsoft.Exchange.WebServices.NETStandard</Title>
<Description>The Exchange Web Services (EWS) Managed API provides a managed interface for developing .NET client applications that use EWS. By using the EWS Managed API, you can access almost all the information stored in an Office 365, Exchange Online, or Exchange Server mailbox.</Description>
<PackageReleaseNotes>removed obsolete WebRequests and switched to HttpClient internally
fixed issue with file attachements downloads
restored ldap autodiscover functionality
merged changes from official Microsoft repository
added cancellation token for most of methods
</PackageReleaseNotes>
<Version>2.0.0-beta2</Version>
<PackageLicenseFile>license.txt</PackageLicenseFile>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System.Xml" />
<Reference Include="System.Security" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

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

<ItemGroup>
<Compile Remove="Credentials\BasicAuthModuleForUTF8.cs" />
<ItemGroup>
<PackageReference Include="System.DirectoryServices" Version="4.7.0" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.DirectoryServices" Version="4.7.0" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
<ItemGroup>
<None Include="license.txt">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

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

</Project>