Warehouse.Version.IsCompatibleWith C# (CSharp) Method

IsCompatibleWith() public method

Check if this version is compatible agains an starcounter version
public IsCompatibleWith ( string starcounterVersion ) : bool
starcounterVersion string
return bool
        public bool IsCompatibleWith(string starcounterVersion) {

            if (string.IsNullOrEmpty(this.Compatiblility)) return true;

            try {
                SemVer.Version scVersion = new SemVer.Version(starcounterVersion, true);
                SemVer.Range versionRange = new SemVer.Range(this.Compatiblility);
                return ((versionRange == null || scVersion == null) || versionRange.IsSatisfied(starcounterVersion, true));
            }
            catch (Exception) {
                return false;
            }
        }
    }