コード例 #1
0
ファイル: Builder.cs プロジェクト: Ethereal77/stride
            public ObjectId ComputeInputHash(UrlType type, string filePath)
            {
                var hash = ObjectId.Empty;

                switch (type)
                {
                case UrlType.File:
                    hash = builderContext.InputHashes.ComputeFileHash(filePath);
                    break;

                case UrlType.Content:
                    if (!buildTransaction.TryGetValue(filePath, out hash))
                    {
                        Logger.Warning("Location " + filePath + " does not exist currently and is required to compute the current command hash. The build cache will not work for this command!");
                    }
                    break;
                }

                return(hash);
            }
コード例 #2
0
ファイル: BuildTransaction.cs プロジェクト: ykafia/stride
 public bool TryGetValue(string url, out ObjectId objectId)
 {
     return(buildTransaction.TryGetValue(url, out objectId));
 }