示例#1
0
        public static SyncEntity Create(IEntityInfo syncEntity)
        {
            if (syncEntity == null)
            {
                return(null);
            }

            var synchronizedAttribute = syncEntity.GetAttribute <SynchronizedEntityAttribute>();

            if (synchronizedAttribute == null)
            {
                return(null);
            }

            return(new SyncEntity(syncEntity, synchronizedAttribute));
        }
示例#2
0
 /// <summary>
 /// Looking for specified attribute on entity class
 /// </summary>
 /// <typeparam name="T">Type of attribute searched.</typeparam>
 /// <returns>Attribute found or null.</returns>
 public T GetAttribute <T>()
 {
     return(_syncEntity.GetAttribute <T>());
 }