SenseNet.ContentRepository.Storage.NodeSaveSettings.GetSavingAlgorithm C# (CSharp) Méthode

GetSavingAlgorithm() private méthode

private GetSavingAlgorithm ( ) : SavingAlgorithm
Résultat SavingAlgorithm
        internal SavingAlgorithm GetSavingAlgorithm()
        {
            Validate();

            if (CurrentVersionId == 0)
                return SavingAlgorithm.CreateNewNode;
            if (ExpectedVersionId == 0)
                return SavingAlgorithm.CopyToNewVersionAndUpdate;
            if (CurrentVersionId == ExpectedVersionId)
                return SavingAlgorithm.UpdateSameVersion;
            if (CurrentVersionId != ExpectedVersionId)
                return SavingAlgorithm.CopyToSpecifiedVersionAndUpdate;

            throw new ApplicationException("Invalid version combination.");
        }
    }