C# Класс MsOfficeTracker.Helpers.Office365Api

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Authenticate ( ) : Task

try logging in, or show sign-in page and ask for rights

GetInstance ( ) : Office365Api

Singleton

GetNumberOfEmailsSent ( DateTimeOffset date ) : Task

Returns a list of emails which were sent on a given date

GetNumberOfUnreadEmailsInInbox ( ) : Task

Returns the number of unread emails currently in the inbox

GetNumberOfUnreadEmailsReceived ( DateTimeOffset date ) : Task

Returns a list of emails which were received on a given date AND are unread (and not in junk or delete folder)

GetPhotoForUser ( string email ) : Task
GetTotalNumberOfEmailsInInbox ( ) : Task

Returns the total number of emails currently in the inbox (read and unread)

GetTotalNumberOfEmailsReceived ( DateTimeOffset date ) : Task

Returns a list of emails which were received on a given date (and not in junk or delete folder)

IsAuthenticated ( ) : bool

Returns true if the user is already authenticated with Office 365

LoadMeetings ( DateTimeOffset date ) : Task>
SignOut ( ) : void

clear the ADAL token cache It's also necessary to clear the cookies from the browser' control so the next user has a chance to sign in.

Приватные методы

Метод Описание
ClearCookies ( ) : void

This function clears cookies from the browser control used by ADAL.

GetDeleteAndJunkFolderIds ( ) : Task>

Loads a list of folders to find the Ids of the junk and deleted items folders to filter them

InternetGetConnectedState ( int &description, int reservedValue ) : bool
IsInternetAvailable ( ) : bool
Office365Api ( ) : System
SignIn ( ) : Task

force ADAL to prompt the user for credentials by specifying PromptBehavior.Always. ADAL will get a token and cache it

TrySilentAuthentication ( ) : Task

This method is called from a method if the user is not properly signed in yet and to check if the user can be authenticated (also checks for an active internet connection)

Описание методов

Authenticate() публичный Метод

try logging in, or show sign-in page and ask for rights
public Authenticate ( ) : Task
Результат Task

GetInstance() публичный статический Метод

Singleton
public static GetInstance ( ) : Office365Api
Результат Office365Api

GetNumberOfEmailsSent() публичный Метод

Returns a list of emails which were sent on a given date
public GetNumberOfEmailsSent ( DateTimeOffset date ) : Task
date DateTimeOffset
Результат Task

GetNumberOfUnreadEmailsInInbox() публичный Метод

Returns the number of unread emails currently in the inbox
public GetNumberOfUnreadEmailsInInbox ( ) : Task
Результат Task

GetNumberOfUnreadEmailsReceived() публичный Метод

Returns a list of emails which were received on a given date AND are unread (and not in junk or delete folder)
public GetNumberOfUnreadEmailsReceived ( DateTimeOffset date ) : Task
date DateTimeOffset
Результат Task

GetPhotoForUser() публичный Метод

public GetPhotoForUser ( string email ) : Task
email string
Результат Task

GetTotalNumberOfEmailsInInbox() публичный Метод

Returns the total number of emails currently in the inbox (read and unread)
public GetTotalNumberOfEmailsInInbox ( ) : Task
Результат Task

GetTotalNumberOfEmailsReceived() публичный Метод

Returns a list of emails which were received on a given date (and not in junk or delete folder)
public GetTotalNumberOfEmailsReceived ( DateTimeOffset date ) : Task
date DateTimeOffset
Результат Task

IsAuthenticated() публичный Метод

Returns true if the user is already authenticated with Office 365
public IsAuthenticated ( ) : bool
Результат bool

LoadMeetings() публичный Метод

public LoadMeetings ( DateTimeOffset date ) : Task>
date DateTimeOffset
Результат Task>

SignOut() публичный Метод

clear the ADAL token cache It's also necessary to clear the cookies from the browser' control so the next user has a chance to sign in.
public SignOut ( ) : void
Результат void