Esempio n. 1
0
        static void TestList()
        {
            __opColon__opColon <int> test    = MakeList <int>(new int[] { 5, 3, 2 });
            __opColon__opColon <int> addTest = MakeList <int>(new int[] { 1, 6 });

            length <int> __tmp0 = new length <int>();

            __tmp0.__arg0 = test;
            __tmp0.Run();

            append <int> __tmp1 = new append <int>();

            __tmp1.__arg0 = test;
            __tmp1.__arg1 = addTest;
            __tmp1.Run();

            if (__tmp0.__res.HasValue)
            {
                Console.WriteLine(__tmp0.__res.Value);
            }
            else
            {
                Console.WriteLine("The rule has failed its evaluation");
            }

            if (__tmp1.__res.HasValue)
            {
                Console.WriteLine(__tmp1.__res.Value);
            }
            else
            {
                Console.WriteLine("The rule has failed its evaluation");
            }
        }
        public void Verify()
        {
            var serializer = new ConfigurationContainer().EnableParameterizedContentWithPropertyAssignments()
                             .EnableReferences()
                             .Create()
                             .ForTesting();

            var length   = new length(11);
            var instance = new vector(length, length);

            var cycled = serializer.Cycle(instance);

            cycled.L1.Should().BeSameAs(cycled.L2);
        }
 public UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length) => Initialize(buffer, offset, length, FileAccess.Read, false);
     : super(InputSectionPartKind.Pragma, position, length, line) {
     this.restore = restore;
     this.warnings = warnings;
 }
Esempio n. 5
0
     : super(type, position, length, line, inputSectionParts)
 {
     this.skippedSection = skippedSection;
 }
     : super(InputSectionPartKind.If, position, length, line, parts, skippedSection, expressionValue) {
 }
     : super(InputSectionPartKind.Line, position, length, line) {
     this.filename = filename;
 }
Esempio n. 8
0
 (@this ?? throw new ArgumentNullException(nameof(@this))).Substring(startIndex, Math.Min(length, @this.Length - startIndex));
     : super(InputSectionPartKind.Definition, position, length, line) {
     this.define = define;
     this.symbol = symbol;
 }
Esempio n. 10
0
     : super(InputSectionPartKind.Line, position, length, line)
 {
     this.filename = filename;
 }
Esempio n. 11
0
     : super(InputSectionPartKind.Line, position, length, line)
 {
     this.hidden   = hidden;
     this.@default = !hidden;
 }
Esempio n. 12
0
     : super(InputSectionPartKind.If, position, length, line, parts, skippedSection, expressionValue)
 {
 }
Esempio n. 13
0
     : super(InputSectionPartKind.Else, position, length, line, parts, skippedSection)
 {
 }
Esempio n. 14
0
     : super(InputSectionPartKind.Diagnostic, position, length, line)
 {
     this.error   = error;
     this.message = message;
 }
Esempio n. 15
0
     : super(InputSectionPartKind.Definition, position, length, line)
 {
     this.define = define;
     this.symbol = symbol;
 }
Esempio n. 16
0
     : super(type, position, length, line, parts, skippedSection)
 {
     this.expressionValue = expressionValue;
 }
Esempio n. 17
0
 public Bits(int length, bool defaultValue) => bits = new BitArray(length, defaultValue);
Esempio n. 18
0
     : super(InputSectionPartKind.Pragma, position, length, line)
 {
     this.restore  = restore;
     this.warnings = warnings;
 }
Esempio n. 19
0
 public vector(length l1, length l2)
 {
     L1 = l1;
     L2 = l2;
 }
Esempio n. 20
0
     : super(InputSectionPartKind.Region, position, length, line, parts)
 {
     this.startMessage = startMessage;
     this.endMessage   = endMessage;
 }
Esempio n. 21
0
 "wav" => new RIFFWaveWriter(path, channelCount, length, sampleRate, bits),
Esempio n. 22
0
     : super(InputSectionPartKind.SourceCode, position, length, line)
 {
 }
     : super(InputSectionPartKind.Diagnostic, position, length, line) {
     this.error = error;
     this.message = message;
 }
Esempio n. 24
0
     : super(InputSectionPartKind.Endif, position, length, line)
 {
 }
     : super(InputSectionPartKind.Else, position, length, line, parts, skippedSection) {
 }
     : super(InputSectionPartKind.SourceCode, position, length, line) {
 }
     : super(InputSectionPartKind.Line, position, length, line) {
     this.hidden = hidden;
     this.@default = !hidden;
 }
Esempio n. 28
0
 => Reset(value, startIndex, length, position);
     : super(InputSectionPartKind.Region, position, length, line, parts) {
     this.startMessage = startMessage;
     this.endMessage = endMessage;
 }
Esempio n. 30
0
     : super(type, position, length, line)
 {
     this.inputSectionParts = inputSectionParts;
 }
     : super(InputSectionPartKind.Endif, position, length, line) {
 }
Esempio n. 32
0
 value = new MessageHeader(magic, command, length, checksum);
 Memory.CopyMemory(m_buffer, (void *)ptr, Math.Min(length, BytesUsed));
Esempio n. 34
0
 public Rectangle_Tests() => SUT = new Rectangle(length, width);
Esempio n. 35
0
        public object getValor(Entorno.Entorno ent)
        {
            if (ent.existe(variable))
            {
                Simbolo sim = ent.get(variable);

                Object valor = sim.valor;
                foreach (Expresion exp in this.fuciones)
                {
                    if (exp is Contiene)
                    {
                        Contiene exp2 = (Contiene)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is Insertar)
                    {
                        Insertar exp2 = (Insertar)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is Obtener)
                    {
                        Obtener exp2 = (Obtener)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is Poner)
                    {
                        Poner exp2 = (Poner)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is Remover)
                    {
                        Remover exp2 = (Remover)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is Size)
                    {
                        Size exp2 = (Size)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is Vaciar)
                    {
                        Vaciar exp2 = (Vaciar)exp;
                        exp2.coleccion = valor;
                        valor          = exp2.getValor(ent);
                    }
                    else if (exp is endWith)
                    {
                        endWith exp2 = (endWith)exp;
                        exp2.cadena = valor;
                        valor       = exp2.getValor(ent);
                    }
                    else if (exp is length)
                    {
                        length exp2 = (length)exp;
                        exp2.cadena = valor;
                        valor       = exp2.getValor(ent);
                    }
                    else if (exp is startsWith)
                    {
                        startsWith exp2 = (startsWith)exp;
                        exp2.cadena = valor;
                        valor       = exp2.getValor(ent);
                    }
                    else if (exp is subString)
                    {
                        subString exp2 = (subString)exp;
                        exp2.cadena = valor;
                        valor       = exp2.getValor(ent);
                    }
                    else if (exp is toLower)
                    {
                        toLower exp2 = (toLower)exp;
                        exp2.cadena = valor;
                        valor       = exp2.getValor(ent);
                    }
                    else if (exp is toUpper)
                    {
                        toUpper exp2 = (toUpper)exp;
                        exp2.cadena = valor;
                        valor       = exp2.getValor(ent);
                    }
                    else if (exp is getDay)
                    {
                        getDay exp2 = (getDay)exp;
                        exp2.fecha = valor;
                        valor      = exp2.getValor(ent);
                    }
                    else if (exp is getMonth)
                    {
                        getMonth exp2 = (getMonth)exp;
                        exp2.fecha = valor;
                        valor      = exp2.getValor(ent);
                    }
                    else if (exp is getYear)
                    {
                        getYear exp2 = (getYear)exp;
                        exp2.fecha = valor;
                        valor      = exp2.getValor(ent);
                    }
                    else if (exp is getHour)
                    {
                        getHour exp2 = (getHour)exp;
                        exp2.hora = valor;
                        valor     = exp2.getValor(ent);
                    }
                    else if (exp is getMinuts)
                    {
                        getMinuts exp2 = (getMinuts)exp;
                        exp2.hora = valor;
                        valor     = exp2.getValor(ent);
                    }
                    else if (exp is getSeconds)
                    {
                        getSeconds exp2 = (getSeconds)exp;
                        exp2.hora = valor;
                        valor     = exp2.getValor(ent);
                    }
                    else if (exp is Identificador)
                    {
                        if (valor is Objeto)
                        {
                            Objeto        ob  = (Objeto)valor;
                            Identificador ide = (Identificador)exp;

                            valor = ide.getValor(ob.atributos);
                        }
                    }
                }
                return(valor);
            }
            return(null);
        }
     : super(type, position, length, line) {
     this.inputSectionParts = inputSectionParts;
 }
Esempio n. 37
0
 var(length, content) = contentInfo;
     : super(type, position, length, line, inputSectionParts) {
     this.skippedSection = skippedSection;
 }
Esempio n. 39
0
            public AdornedImage()
            {
                var data = new length(23);

                Vector = new vector(data, data);
            }
     : super(type, position, length, line, parts, skippedSection) {
     this.expressionValue = expressionValue;
 }
 var(length, hubId, messageType, headerLength) = ParseCommonHeader(data);
Esempio n. 42
0
 return(new GridLength(length, GridUnitType.Auto));