Beispiel #1
0
        public static int DCOUNT(UvVar array, UvVar delimiter)
        {
            switch ((char)delimiter)
            {
            case (char)254:
            {
                return(0); //ToDo: return array.Count();
            }

            case (char)253:
            {
                return(0); //ToDo: return array.Count(1);
            }

            case (char)252:
            {
                return(0); //ToDo: return array.Count(1, 1);
            }

            default:
            {
                return(0);
            }
            }
        }
Beispiel #2
0
 public static bool READV(ref int singleValue, UvVar uvFile, string itemId, int attributeNo)
 {
     //ToDo: uvFile.RecordID = itemId;
     try
     {
         //ToDo: uvFile.ReadField(attributeNo);
         //ToDo: singleValue = int.Parse(uvFile.ReadField(attributeNo).StringValue);
         return(true);
     }
     catch { }
     return(false);
 }
Beispiel #3
0
 public static bool READ(ref string text, UvVar uvFile, string itemId)
 {
     //ToDo: uvFile.RecordID = itemId;
     try
     {
         //ToDo: uvFile.Read();
         //ToDo: text = uvFile.Record.StringValue;
         return(true);
     }
     catch { }
     return(false);
 }
Beispiel #4
0
 public static bool READ(ref UvVar dynArray, UvVar uvFile, UvVar itemId)
 {
     //ToDo: uvFile.RecordID = itemId;
     try
     {
         //ToDo: uvFile.Read();
         //ToDo: dynArray = new UvVar(uvFile.Record.StringValue);
         return(true);
     }
     catch { }
     return(false);
 }
Beispiel #5
0
        public UvVar Clone()
        {
            // deep copy in separate memory space
            MemoryStream    memoryStream    = new MemoryStream();
            BinaryFormatter binaryFormatter = new BinaryFormatter();

            binaryFormatter.Serialize(memoryStream, this);
            memoryStream.Position = 0;
            UvVar copyPv2 = (UvVar)binaryFormatter.Deserialize(memoryStream);

            memoryStream.Close();
            return(copyPv2);
        }
Beispiel #6
0
 private int CompareTo(UvVar operand)
 {
     if ((this.Type | operand.Type) == UvVarType.Number)
     {
         return(this.DecimalValue.CompareTo(operand.DecimalValue));
     }
     if ((this.Type | operand.Type) == UvVarType.Text)
     {
         int result1;
         int result2;
         if (Int32.TryParse(this.StringValue, out result1) &&
             Int32.TryParse(operand.StringValue, out result2))
         {
             return(result1.CompareTo(result2));
         }
         else
         {
             return((this.StringValue).CompareTo(operand.StringValue));
         }
     }
     if ((this.Type == UvVarType.Number && operand.Type == UvVarType.Text))
     {
         // Convert Text to Number, if possible and do a Numeric comparison otherwise
         // do a Text comparison
         int result2;
         if (Int32.TryParse(operand.StringValue, out result2))
         {
             return(this.DecimalValue.CompareTo(result2));
         }
         else
         {
             return(this.DecimalValue.ToString().CompareTo(operand.StringValue));
         }
     }
     if ((this.Type == UvVarType.Text && operand.Type == UvVarType.Number))
     {
         // Convert Text to Number, if possible and do a Numeric comparison otherwise
         // do a Text comparison
         int result1;
         if (Int32.TryParse(this.StringValue, out result1))
         {
             return(result1.CompareTo(operand.DecimalValue));
         }
         else
         {
             return(this.StringValue.CompareTo(operand.DecimalValue.ToString()));
         }
     }
     return(0);
 }
Beispiel #7
0
 public static UvVar MATCH(UvVar value, UvVar pattern)
 {
     return(0);
 }
Beispiel #8
0
 public static UvVar NUM(UvVar value)
 {
     return(0);
 }
Beispiel #9
0
 public static bool OPENSEQ(string fileName, out UvVar file)
 {
     file = 0;
     return(true);
 }
Beispiel #10
0
 public static ReadUResult READU_LOCKED(ref UvVar dynArray, UvVar uvFile, string itemId)
 {
     return(ReadUResult.Success);
 }
Beispiel #11
0
 public static bool READV(ref UvVar dynArray, UvVar uvFile, UvVar itemId, UvVar attributeNo)
 {
     return(true);
 }
Beispiel #12
0
 public static bool READBLK(ref string text, UvVar uvFile)
 {
     return(true);
 }
Beispiel #13
0
 public static UvVar DEL(UvVar dynarray)
 {
     return("");
 }
Beispiel #14
0
 public static void BREAK(UvVar value)
 {
 }
Beispiel #15
0
 public static string TRIM(UvVar value)
 {
     return("");
 }
Beispiel #16
0
 public static void ECHO(UvVar value)
 {
 }
Beispiel #17
0
 //ToDo:
 //public static void CALL_EXECUTE(
 //   string routineName,
 //   string instruction,
 //   string options,
 //   out UvVar returnList,
 //   out bool listAvailable,
 //   out UvVar messages,
 //   out UvVar errors)
 //{
 //   //ToDo: returnList = new UvVar();
 //   listAvailable = false;
 //   //ToDo: messages = new UvVar();
 //   //ToDo: errors = new UvVar();
 //}
 public static UvVar SYSTEM(UvVar systemNo)
 {
     return("");
 }
Beispiel #18
0
 public static UvVar SEQ(UvVar value)
 {
     return("");
 }
Beispiel #19
0
 public static UvVar INSERT(UvVar dynarray, UvVar att, UvVar value)
 {
     return("");
 }
Beispiel #20
0
 public static decimal RND(UvVar value)
 {
     return(0);
 }
Beispiel #21
0
 public static UvVar INS(UvVar value, UvVar dynarray)
 {
     return("");
 }
Beispiel #22
0
 public static bool NOT(UvVar value)
 {
     return(true);
 }
Beispiel #23
0
 public static UvVar DELETE(UvVar dynarray, UvVar att, UvVar mv, UvVar sv)
 {
     return("");
 }
Beispiel #24
0
 public static bool ASSIGNED(UvVar value)
 {
     return(true);
 }
Beispiel #25
0
 public static int ABS(UvVar value)
 {
     return(0);
 }
Beispiel #26
0
 public static UvVar MOD(UvVar value1, UvVar value2)
 {
     return(0);
 }
Beispiel #27
0
 public static bool READVU(ref int singleValue, UvVar uvFile, string itemId, int attributeNo)
 {
     return(true);
 }
Beispiel #28
0
 public static bool READU(ref UvVar dynArray, UvVar uvFile, string itemId)
 {
     return(true);
 }
Beispiel #29
0
 public static void MAT(ref UvVar[,] destination, UvVar source)
 {
 }
Beispiel #30
0
 public static bool OPENDICT(string fileName, out UvVar file)
 {
     file = 0;//ToDo: file = UvSession.GetInstance().CreateUvVar(fileName);
     return(true);
 }