Ejemplo n.º 1
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked {
                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                switch (hash)
                {
                case 4949376:
                {
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    this.cur = global::haxe.lang.Runtime.toString(@value);
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    return(@value);
                }


                case 1821933:
                {
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    this.isGlobal = global::haxe.lang.Runtime.toBool(@value);
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    return(@value);
                }


                case 109:
                {
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    this.m = ((global::System.Text.RegularExpressions.Match)(@value));
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    return(@value);
                }


                case 1723805383:
                {
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    this.regex = ((global::System.Text.RegularExpressions.Regex)(@value));
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    return(@value);
                }


                default:
                {
                                                #line 28 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
                        #line default
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Numbered string from # template
        /// </summary>
        private string ConvertNumberedString(string template, int i)
        {
            global::System.Text.RegularExpressions.Regex r =
                new global::System.Text.RegularExpressions.Regex(@"#+");
            global::System.Text.RegularExpressions.Match m = r.Match(template);

            if (m.Length == 0)
            {
                return(template);
            }

            string numStrFmt = m.Value.Replace("#", "0");
            string numStr    = i.ToString(numStrFmt);

            return(template.Replace(m.Value, numStr));
        }
Ejemplo n.º 3
0
        private static SensitivityLabelModel ToSensitivityLabelModel(SensitivityLabel sensitivityLabel)
        {
            var match = new global::System.Text.RegularExpressions.Regex("/schemas/(?<schemaName>.*)/tables/(?<tableName>.*)/columns/(?<columnName>.*)/sensitivityLabels/",
                                                                         global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(sensitivityLabel.Id);

            return(new SensitivityLabelModel
            {
                SchemaName = match.Groups["schemaName"].Value,
                TableName = match.Groups["tableName"].Value,
                ColumnName = match.Groups["columnName"].Value,
                SensitivityLabel = NullifyStringIfEmpty(sensitivityLabel.LabelName),
                SensitivityLabelId = NullifyStringIfEmpty(sensitivityLabel.LabelId),
                InformationType = NullifyStringIfEmpty(sensitivityLabel.InformationType),
                InformationTypeId = NullifyStringIfEmpty(sensitivityLabel.InformationTypeId),
                Rank = ToSensitivityRank(sensitivityLabel.Rank)
            });
        }
Ejemplo n.º 4
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 4949376:
                {
                    this.cur = global::haxe.lang.Runtime.toString(@value);
                    return(@value);
                }


                case 1821933:
                {
                    this.isGlobal = ((bool)(@value));
                    return(@value);
                }


                case 109:
                {
                    this.m = ((global::System.Text.RegularExpressions.Match)(@value));
                    return(@value);
                }


                case 1723805383:
                {
                    this.regex = ((global::System.Text.RegularExpressions.Regex)(@value));
                    return(@value);
                }


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Ejemplo n.º 5
0
 // Token: 0x06000607 RID: 1543 RVA: 0x0001D434 File Offset: 0x0001B634
 public static global::UnityEngine.Transform FindDescendant(this global::UnityEngine.Transform transform, global::System.Text.RegularExpressions.Regex name)
 {
     return(global::System.Linq.Enumerable.FirstOrDefault <global::UnityEngine.Transform>(transform.Descendants(), (global::UnityEngine.Transform d) => name.IsMatch(d.name)));
 }
        private object[] CreateExpression(out Regex exp, out int[] fieldsUsed, string format, global::System.IFormatProvider formatProvider)
        {
            global::System.Globalization.NumberFormatInfo nfi =
                global::System.Globalization.NumberFormatInfo.GetInstance(formatProvider);

            object[] numFormat;
            lock (_parseTimeSpanCache)
            {
                if (!_parseTimeSpanCache.TryGetValue(format, out numFormat))
                {
                    numFormat = new object[15];
                    global::System.Collections.Generic.List<int> fields = new global::System.Collections.Generic.List<int>();

                    int pos = 0;
                    global::System.Text.StringBuilder sb = new global::System.Text.StringBuilder();
                    sb.Append("^");
                    foreach (Match m in _formatString.Matches(format))
                    {
                        sb.Append(Regex.Escape(format.Substring(pos, m.Index - pos)));
                        pos = m.Index + m.Length;
                        int fld = int.Parse(m.Groups["field"].Value);
                        if (fld < 0 || fld > 12)
                            throw new global::System.FormatException(string.Format(ResourceMessages.InvalidFormat, format));
                        if (fld == 2) //neg sign
                            sb.AppendFormat("(?<f{0}>{1})?", fld, Regex.Escape(nfi.NegativeSign));
                        else if(pos+1 < format.Length)
                            sb.AppendFormat("(?<f{0}>[^{1}]+?)", fld, Regex.Escape(new string(format[pos + 1], 1)));
                        else
                            sb.AppendFormat("(?<f{0}>.+)", fld);
                        numFormat[fld] = m.Groups["format"].Success ? m.Groups["format"].Value : null;
                        fields.Add(fld);
                    }
                    sb.Append(Regex.Escape(format.Substring(pos, format.Length - pos)));
                    sb.Append("$");
                    numFormat[13] = new Regex(sb.ToString());
                    numFormat[14] = fields.ToArray();
                    _parseTimeSpanCache[format] = numFormat;
                }
            }
            exp = (Regex) numFormat[13];
            fieldsUsed = (int[]) numFormat[14];
            return numFormat;
        }
Ejemplo n.º 7
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 4949376:
					{
						this.cur = global::haxe.lang.Runtime.toString(@value);
						return @value;
					}
					
					
					case 1821933:
					{
						this.isGlobal = ((bool) (@value) );
						return @value;
					}
					
					
					case 109:
					{
						this.m = ((global::System.Text.RegularExpressions.Match) (@value) );
						return @value;
					}
					
					
					case 1723805383:
					{
						this.regex = ((global::System.Text.RegularExpressions.Regex) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}