public override int GetHashCode()
 {
     unchecked
     {
         return((StructureId.GetHashCode() * 397) ^ (Path != null ? Path.GetHashCode() : 0));
     }
 }
        public virtual IStructureId Generate(IStructureSchema structureSchema)
        {
            var nextId = DbClient.CheckOutAndGetNextIdentity(structureSchema.Name, 1);

            if (structureSchema.IdAccessor.IdType == StructureIdTypes.Identity)
            {
                return(StructureId.Create((int)nextId));
            }

            return(StructureId.Create(nextId));
        }
        protected virtual IStructureId[] GenerateBigIdentityStructureId(IStructureSchema structureSchema, int numOfIds)
        {
            var structureIds = new IStructureId[numOfIds];
            var startId      = DbClient.CheckOutAndGetNextIdentity(structureSchema.Name, numOfIds);

            for (var c = 0; c < numOfIds; c++)
            {
                structureIds[c] = StructureId.Create(startId++);
            }

            return(structureIds);
        }