示例#1
0
 /// <summary>
 /// Update entity in contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid of contact
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse UpdateWithHttpMessages(this IContacts operations, string contactid, MicrosoftDynamicsCRMcontact body, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.UpdateWithHttpMessagesAsync(contactid, body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete entity from contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 public static void Delete(this IContacts operations, string contactid, string ifMatch = default(string))
 {
     operations.DeleteAsync(contactid, ifMatch).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Update entity in contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 public static void Update(this IContacts operations, string contactid, MicrosoftDynamicsCRMcontact body)
 {
     operations.UpdateAsync(contactid, body).GetAwaiter().GetResult();
 }
示例#4
0
 public Contact GetContact(IContacts acc, string nameOrPhoneNumber)
 {
     return(acc.GetContact(nameOrPhoneNumber));
 }
示例#5
0
 public Company(string companyName, string companyAddress, string companyContactNo, IContacts contacts)
 {
     CompanyName      = companyName;
     CompanyAddress   = companyAddress;
     CompanyContactNo = companyContactNo;
     Contacts         = contacts;
     Console.WriteLine("Company object created...");
 }
        /// <param name='operations'>
        /// Reference to the ContactsConsoleApplication.IContacts.
        /// </param>
        /// <param name='contact'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <string> PostByContactAsync(this IContacts operations, Contact contact, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <string> result = await operations.PostByContactWithOperationResponseAsync(contact, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
 /// <summary>
 /// Add new entity to contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 public static MicrosoftDynamicsCRMcontact Create(this IContacts operations, MicrosoftDynamicsCRMcontact body, string prefer = "return=representation")
 {
     return(operations.CreateAsync(body, prefer).GetAwaiter().GetResult());
 }
示例#8
0
        /// <summary>
        /// Get all of the details about the contacts matching the criteria.
        /// </summary>
        /// <param name="contacts">The contacts resource.</param>
        /// <param name="criteria">Filtering criteria.</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        /// <returns>
        /// An array of <see cref="Contact" />.
        /// </returns>
        public static Task <Contact[]> SearchAsync(this IContacts contacts, SearchCriteria <ContactsFilterField> criteria, CancellationToken cancellationToken = default)
        {
            var filterCriteria = criteria == null?Array.Empty <SearchCriteria <ContactsFilterField> >() : new[] { criteria };

            return(contacts.SearchAsync(filterCriteria, cancellationToken));
        }
示例#9
0
 /// <summary>
 /// Get entities from contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMcontactCollection Get(this IContacts operations, int?top = default(int?), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
示例#10
0
 public BikeController(IBikeRepository bikeRepository, IBikeCategory bikeCategory, IContacts contacts, AppDBContent dbContent)
 {
     _bikeRepository = bikeRepository;
     _allCategories  = bikeCategory;
     _dbContent      = dbContent;
 }
示例#11
0
 public SignUpPageViewModel(INavigationService navigationService, IPageDialogService dialogService, IContacts contactService)
     : base(navigationService)
 {
     Title              = "Login Page";
     _dialogService     = dialogService;
     _navigationService = navigationService;
     _contactService    = contactService;
     OpenContacts();
 }
示例#12
0
 /// <summary>
 /// Get entities from contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GetOKResponseModelModelModelModelModelModelModelModelModelModelModelModelModelModel> GetAsync(this IContacts operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#13
0
 public Company(string companyName, string companyAddress, string companyContactNo, IContacts contacts)
 {
     // TODO
     Console.WriteLine("Company object created...");
 }
示例#14
0
 /// <summary>
 /// Delete entity from contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid of contact
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse DeleteWithHttpMessages(this IContacts operations, string contactid, string ifMatch = default(string), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.DeleteWithHttpMessagesAsync(contactid, ifMatch, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Remove reference to adoxio_workers
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactId'>
 /// key: contactId
 /// </param>
 /// <param name='fieldname'>
 /// key: fieldname
 /// </param>
 /// <param name='odataid'>
 /// reference value
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RemoveReferenceAsync(this IContacts operations, string contactId, string fieldname, string removeId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RemoveReferenceWithHttpMessagesAsync(contactId, fieldname, removeId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#16
0
 /// <summary>
 /// Get a contact
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='id'>
 /// Get specific contact
 /// </param>
 public static ContactsModel GetContact(this IContacts operations, string subscriptionId, string id)
 {
     return(operations.GetContactAsync(subscriptionId, id).GetAwaiter().GetResult());
 }
        /// <param name='operations'>
        /// Reference to the ContactsConsoleApplication.IContacts.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <Contact> > GetAsync(this IContacts operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <ContactsConsoleApplication.Models.Contact> > result = await operations.GetWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
示例#18
0
 /// <summary>
 /// Get a list of contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='take'>
 /// Number of items to return
 /// </param>
 /// <param name='skip'>
 /// Number of item to skip over
 /// </param>
 /// <param name='country'>
 /// The country of the contact
 /// </param>
 public static PagedResponse <ContactsModel> GetContacts(this IContacts operations, string subscriptionId, int take, int skip, System.Guid?country = default(System.Guid?))
 {
     return(operations.GetContactsAsync(subscriptionId, take, skip, country).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get entities from contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static ContactsGetResponseModel Get(this IContacts operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
示例#20
0
 /// <summary>
 /// Add a new contact
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='building'>
 /// </param>
 /// <param name='city'>
 /// </param>
 /// <param name='street'>
 /// </param>
 /// <param name='postcode'>
 /// </param>
 /// <param name='company'>
 /// </param>
 /// <param name='title'>
 /// </param>
 /// <param name='firstName'>
 /// </param>
 /// <param name='lastName'>
 /// </param>
 public static ContactsModel AddContact(this IContacts operations, string subscriptionId, string building, string city, string street, string postcode, string company = default(string), string title = default(string), string firstName = default(string), string lastName = default(string))
 {
     return(operations.AddContactAsync(subscriptionId, building, city, street, postcode, company, title, firstName, lastName).GetAwaiter().GetResult());
 }
示例#21
0
 public Contact GetContact(IContacts acc, long id)
 {
     return(acc.GetContact(id));
 }
        /// <param name='operations'>
        /// Reference to the ContactsList.MVC.IContacts.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <bool> DeleteAsync(this IContacts operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <bool> result = await operations.DeleteWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
示例#23
0
 public IEnumerable <Contact> GetAllContacts(IContacts acc)
 {
     return(acc.GetAllContacts());
 }
 /// <summary>
 /// Add reference to adoxio_workers
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactId'>
 /// key: contactId
 /// </param>
 /// <param name='fieldname'>
 /// key: fieldname
 /// </param>
 /// <param name='odataid'>
 /// reference value
 /// </param>
 public static void AddReference(this IContacts operations, string contactId, string fieldname, OdataId odataid = default(OdataId))
 {
     operations.AddReferenceAsync(contactId, fieldname, odataid).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get entity from contacts by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMcontact GetByKey(this IContacts operations, string contactid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetByKeyAsync(contactid, select, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Remove reference to adoxio_workers
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactId'>
 /// key: adoxio_workerid
 /// </param>
 /// <param name='fieldname'>
 /// key: fieldname
 /// </param>
 /// <param name='odataid'>
 /// reference value
 /// </param>
 public static void RemoveReference(this IContacts operations, string contactId, string fieldname, string removeId)
 {
     operations.RemoveReferenceAsync(contactId, fieldname, removeId).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Delete entity from contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IContacts operations, string contactid, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(contactid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Add reference to adoxio_workers
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactId'>
 /// key: contactId
 /// </param>
 /// <param name='fieldname'>
 /// key: fieldname
 /// </param>
 /// <param name='odataid'>
 /// reference value
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task AddReferenceAsync(this IContacts operations, string contactId, string fieldname, OdataId odataid = default(OdataId), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.AddReferenceWithHttpMessagesAsync(contactId, fieldname, odataid, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Update entity in contacts
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this IContacts operations, string contactid, MicrosoftDynamicsCRMcontact body, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(contactid, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#30
0
 /// <summary>
 /// Get entity from contacts by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='contactid'>
 /// key: contactid of contact
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMcontact> GetByKeyWithHttpMessages(this IContacts operations, string contactid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetByKeyWithHttpMessagesAsync(contactid, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }