Rebel.Tests.Extensions.HiveModelCreationHelper.CreateTypedEntity C# (CSharp) Method

CreateTypedEntity() public static method

public static CreateTypedEntity ( EntitySchema schema, TypedAttribute attribs, bool assignId = false ) : TypedEntity
schema EntitySchema
attribs TypedAttribute
assignId bool
return TypedEntity
        public static TypedEntity CreateTypedEntity(EntitySchema schema, TypedAttribute[] attribs, bool assignId = false)
        {
            var entity = new TypedEntity
                {
                    EntitySchema = schema
                };
            entity.Attributes.Reset(attribs);
            if (assignId)
                entity.Id = new HiveId(Guid.NewGuid());
            return entity;
        }