Example #1
0
 private IResource ToResource(IEtpAdapter etpAdapter, AbstractObject entity, EtpUri parentUri, int hasChildren = -1)
 {
     return(etpAdapter.CreateResource(
                uuid: entity.Uuid,
                uri: entity.GetUri(parentUri),
                resourceType: ResourceTypes.DataObject,
                name: entity.Citation.Title,
                count: hasChildren,
                lastChanged: entity.GetLastChangedMicroseconds()));
 }
Example #2
0
        private IResource ToResource(IEtpAdapter etpAdapter, AbstractObject entity, EtpUri parentUri, int hasChildren = -1)
        {
            var name    = entity.Citation.Title;
            var channel = entity as Channel;

            if (channel != null)
            {
                name = $"{name} ({channel.Mnemonic})";
            }

            return(etpAdapter.CreateResource(
                       uuid: entity.Uuid,
                       uri: entity.GetUri(parentUri),
                       resourceType: ResourceTypes.DataObject,
                       name: name,
                       count: hasChildren,
                       lastChanged: entity.GetLastChangedMicroseconds()));
        }