Esempio n. 1
0
 internal SetJsonOptions(SetJsonOptions options)
 {
     ProjectFolder        = options.ProjectFolder;
     Encountered          = options.Encountered;
     Style                = options.Style;
     RepositoryAttributes = options.RepositoryAttributes;
     LengthDigitCount     = options.LengthDigitCount;
     Version              = options.Version;
 }
Esempio n. 2
0
 public PSRepositoryAttribute(RepositoryAttributes attribute)
 {
     Registry             = attribute?.Registry;
     ImageName            = attribute?.ImageName;
     CreatedTime          = attribute?.CreatedTime;
     LastUpdateTime       = attribute?.LastUpdateTime;
     ManifestCount        = attribute?.ManifestCount;
     TagCount             = attribute?.TagCount;
     ChangeableAttributes = new PSChangeableAttribute(attribute?.ChangeableAttributes);
 }
 internal SetJsonOptions(SetJsonOptions options)
 {
     ProjectFolder         = options.ProjectFolder;
     Encountered           = options.Encountered;
     Style                 = options.Style;
     RepositoryAttributes  = options.RepositoryAttributes;
     LengthDigitCount      = options.LengthDigitCount;
     Version               = options.Version;
     SerializeAllGlobalIds = options.SerializeAllGlobalIds;
     SerializeOwnerHistory = options.SerializeOwnerHistory;
 }
Esempio n. 4
0
        public override PSRepositoryAttribute SendRequest()
        {
            RepositoryAttributes attribute = _client
                                             .GetClient()
                                             .Repository
                                             .GetAttributesAsync(_repositoryName)
                                             .GetAwaiter()
                                             .GetResult();

            return(new PSRepositoryAttribute(attribute));
        }
            private void adopt(BaseClassIfc obj)
            {
                IfcRoot root = obj as IfcRoot;

                if (root != null)
                {
                    IfcOwnerHistory ownerHistory = root.OwnerHistory;
                    if (ownerHistory != null)
                    {
                        RepositoryAttributes = new RepositoryAttributes(ownerHistory.CreationDate, ownerHistory.LastModifiedDate);
                    }
                }
            }
Esempio n. 6
0
 internal void setFileAttributes(string filePath, RepositoryAttributes attributes)
 {
     try
     {
         DateTime created = attributes.Created, modified = attributes.Modified;
         if (created != DateTime.MinValue && created < File.GetCreationTime(filePath))
         {
             File.SetCreationTime(filePath, created);
             File.SetLastWriteTime(filePath, created);
         }
         if (modified != DateTime.MinValue && modified > File.GetLastWriteTime(filePath))
         {
             File.SetLastWriteTime(filePath, modified);
         }
     }
     catch (Exception) { }
 }
Esempio n. 7
0
 internal void setFolderAttributes(string folderPath, RepositoryAttributes attributes)
 {
     try
     {
         DateTime created = attributes.Created, modified = attributes.Modified;
         if (created != DateTime.MinValue && created < Directory.GetCreationTime(folderPath))
         {
             Directory.SetCreationTime(folderPath, created);
             Directory.SetLastWriteTime(folderPath, created);
         }
         if (modified != DateTime.MinValue && modified > Directory.GetLastWriteTime(folderPath))
         {
             Directory.SetLastWriteTime(folderPath, modified);
         }
     }
     catch (Exception) { }
 }