CmisSync.Lib.Cmis.ConvenienceExtenders.CmisConvenienceExtenders.IsContentStreamHashSupported C# (CSharp) Method

IsContentStreamHashSupported() public static method

Returns the hash of the content stream on the server.
public static IsContentStreamHashSupported ( this session ) : bool
session this
return bool
        public static bool IsContentStreamHashSupported(this ISession session) {
            try {
                var type = session.GetTypeDefinition(BaseTypeId.CmisDocument.GetCmisValue());
                if (type == null) {
                    return false;
                }

                foreach (var prop in type.PropertyDefinitions) {
                    if (prop.Id.Equals("cmis:contentStreamHash")) {
                        return true;
                    }
                }
            } catch (CmisObjectNotFoundException) {
            }

            return false;
        }