public LanguageManager(IPortalClient client) { _client = client; _languages = new ObservableCollection<Language>(); if (_client.HasSession) GetLanguages(); else _client.SessionAcquired += ClientSessionAquired; }
public MCMTypesManager(IPortalClient client) { _client = client; _folderTypes = new ObservableCollection<FolderType>(); _formatTypes = new ObservableCollection<FormatType>(); _objectRelationTypes = new ObservableCollection<ObjectRelationType>(); _objectTypes = new ObservableCollection<ObjectType>(); if (_client.HasSession) GetTypes(); else _client.SessionAcquired += ClientSessionAquired; }
public void InitializeAndRun(IPortalClient client) { Client = client; Console.WriteLine(); Console.WriteLine(string.Format(" {0} example ", GetType().Name.Replace("Example", "")).PadRight(50, '=').PadLeft(70, '=')); Console.WriteLine(); Run(); Console.WriteLine(); Console.WriteLine("".PadLeft(70, '=')); Console.WriteLine(); }
private void Initialize() { _client = new PortalClient { ServicePath = _configuration.ServicePath }; var authKeyResponse = _client .AuthKey() //The extension to call .Login(_configuration.AccessToken) //Authentication methods automatically updates the client instance so it knows it's authenticated, it also creates a session .Synchronous() //Halts the current thread until the call is completed .ThrowError() //Throws an exception if the service call returned an error, this must be after the call is completed ("Synchronous()" insures this) .Response; //Returns the response from the service, this must be after the call is completed ("Synchronous()" insures this) Console.WriteLine("Session authenticated, user guid is: {0}", authKeyResponse.Body.Results[0].UserGuid); }
public FileUploadManager(IPortalClient client) { _client = client; _innerFileUploaders = new ObservableCollection<IFileUploader>(); _fileUploaders = new ReadOnlyObservableCollection<IFileUploader>(_innerFileUploaders); }
public FolderManager(IPortalClient client) { _client = ArgumentUtilities.ValidateIsNotNull("client", client); _foldersByParent = new Dictionary<uint?, ObservableCollection<Folder>>(); }
public FileUploader(IPortalClient client) { _client = client; }
private void InitializeClient() { _client = new PortalClient {}; }