Пример #1
0
        public static Token GetFilledToken()
        {
            Token token = EntityGenerator.GetToken();

            tokRep.Save(token);
            return(token);
        }
Пример #2
0
        public static Device GetFilledDevice()
        {
            Device device = EntityGenerator.GetDevice();

            devRep.Save(ref device);
            return(device);
        }
Пример #3
0
        public static Command GetFilledCommand(Device device = null)
        {
            Command comm = EntityGenerator.GetCommand();

            if (device == null)
            {
                device = GetFilledDevice();
            }
            comm.Device = device;
            commRep.Save(comm);
            return(comm);
        }
Пример #4
0
        public static Data GetFilledData(Device device = null)
        {
            Data data = EntityGenerator.GetData();

            if (device == null)
            {
                device = GetFilledDevice();
            }
            data.Device = device;
            dataRep.Save(data);
            return(data);
        }
Пример #5
0
        public static CommandLog GetFilledCommandLog(Command comm = null, Token tok = null)
        {
            CommandLog comL = EntityGenerator.GetCommandLog();

            if (comm == null)
            {
                comm = GetFilledCommand();
            }
            if (tok == null)
            {
                tok = GetFilledToken();
            }
            comL.Command = comm;
            comL.Token   = tok;
            commLogRep.Save(comL);
            return(comL);
        }