Dto/OwnerListHubSpotModel.cs

HubSpot.NET · HubSpot.NET/Api/Owner/Dto/OwnerListHubSpotModel.cs · csharp · MIT
crm

Generic collection model for HubSpot owner data.

// Source: https://github.com/hubspot-net/HubSpot.NET | License: MIT | Copyright 2018 Squared Up
// Provided via justclaw.it.com; keep this notice with the code.
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using HubSpot.NET.Core.Interfaces;

namespace HubSpot.NET.Api.Owner.Dto
{

    /// <summary>
    /// Models a set of owners in HubSpot
    /// </summary>
    [DataContract]
    public class OwnerListHubSpotModel<T> : IHubSpotModel, ICollection<T> 
        where T: OwnerHubSpotModel
    {
        private List<T> Owners { get; } = new List<T>();

        public bool IsNameValue => false;

        public IEnumerator<T> GetEnumerator() 
            => Owners.GetEnumerator();

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key