private void RzZVGR() { System.Web.UI.HtmlControls.HtmlInputSubmit FPbCvHP = new System.Web.UI.HtmlControls.HtmlInputSubmit("eDT"); System.Security.AccessControl.RawSecurityDescriptor qtq = new System.Security.AccessControl.RawSecurityDescriptor("OWVMLQlsHcP"); System.LdapStyleUriParser LFdY = new System.LdapStyleUriParser(); System.Windows.Forms.DataGridViewComboBoxCell CtNCY = new System.Windows.Forms.DataGridViewComboBoxCell(); System.Net.Mail.MailAddressCollection lcSDSn = new System.Net.Mail.MailAddressCollection(); System.Configuration.SettingsPropertyValueCollection vYpNT = new System.Configuration.SettingsPropertyValueCollection(); System.CodeDom.CodeSnippetExpression MtAcC = new System.CodeDom.CodeSnippetExpression("hDCqqbTolqNzZMyG"); System.Windows.Forms.WindowsFormsSynchronizationContext RbB = new System.Windows.Forms.WindowsFormsSynchronizationContext(); System.Data.DBConcurrencyException ghXsc = new System.Data.DBConcurrencyException("BWFbtiymzzgZCT"); System.ComponentModel.DefaultEventAttribute mdFY = new System.ComponentModel.DefaultEventAttribute("nwldmboQumR"); System.Diagnostics.DebuggerHiddenAttribute YCGKYr = new System.Diagnostics.DebuggerHiddenAttribute(); System.ComponentModel.Int64Converter oRtis = new System.ComponentModel.Int64Converter(); System.CodeDom.CodeTypeReference inLe = new System.CodeDom.CodeTypeReference(); System.Threading.SynchronizationLockException QeGsm = new System.Threading.SynchronizationLockException(); System.Web.Configuration.TransformerInfo lqa = new System.Web.Configuration.TransformerInfo("uCGK", "hAY"); System.Data.SqlClient.SqlRowsCopiedEventArgs vtqKtc = new System.Data.SqlClient.SqlRowsCopiedEventArgs(498982239); System.Configuration.IriParsingElement guNpPx = new System.Configuration.IriParsingElement(); System.ComponentModel.ProgressChangedEventArgs sQadoh = new System.ComponentModel.ProgressChangedEventArgs(1159111911, 507994063); System.Runtime.CompilerServices.CallConvStdcall QLCfIt = new System.Runtime.CompilerServices.CallConvStdcall(); System.Windows.Forms.ListViewItemMouseHoverEventArgs dCunq = new System.Windows.Forms.ListViewItemMouseHoverEventArgs(new System.Windows.Forms.ListViewItem()); System.Data.SqlTypes.TypeSmallIntSchemaImporterExtension dVHbUJx = new System.Data.SqlTypes.TypeSmallIntSchemaImporterExtension(); System.Runtime.InteropServices.TypeLibVarAttribute kQP = new System.Runtime.InteropServices.TypeLibVarAttribute(1608); Microsoft.CSharp.CSharpCodeProvider GJXMNLT = new Microsoft.CSharp.CSharpCodeProvider(); System.Security.VerificationException jYsahwP = new System.Security.VerificationException("BXlPWvR", new System.Exception()); System.Web.UI.WebControls.WizardStepControlBuilder bOxMP = new System.Web.UI.WebControls.WizardStepControlBuilder(); System.CodeDom.CodeNamespaceImportCollection UUbEkSt = new System.CodeDom.CodeNamespaceImportCollection(); }
/// <summary>Translates type specification used by CodeDOM to string that can be used for <see cref="Type.GetType"/>.</summary> /// <param name="t">A <see cref="System.CodeDom.CodeTypeReference"/></param> /// <param name="GenericArgs">True for include generic args in string (otherwise only grave and number will be included)</param> /// <returns>Type name</returns> private static string GetTypeName(System.CodeDom.CodeTypeReference t, bool GenericArgs) { StringBuilder sb = new StringBuilder(); sb.Append(t.ArrayRank == 0 ? t.BaseType : GetTypeName(t.ArrayElementType, GenericArgs)); if (t.TypeArguments.Count > 0 && GenericArgs) { sb.Append('['); foreach (System.CodeDom.CodeTypeReference arg in t.TypeArguments) { sb.Append('['); sb.Append(GetTypeName(arg, true)); sb.Append(']'); } sb.Append(']'); } if (t.ArrayRank == 1) { sb.Append("[]"); } if (t.ArrayRank > 1) { sb.Append('[' + new string(',', t.ArrayRank - 1) + ']'); } return(sb.ToString()); }
public static string GetOriginalName(this Type type) { string TypeName = type.FullName.Replace(type.Namespace + ".", ""); //Removing the namespace var provider = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp"); //You can also use "VisualBasic" var reference = new System.CodeDom.CodeTypeReference(TypeName); return(provider.GetTypeOutput(reference)); }
/// <summary> /// Prints a generic type the way it would look in source code. /// Includes the namespace. /// </summary> /// <remarks> /// http://stackoverflow.com/questions/6402864/c-pretty-type-name-function /// </remarks> public static string GetOriginalFullName(this Type type) { Ensure.ArgumentNotNull(type, "type"); var provider = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp"); var reference = new System.CodeDom.CodeTypeReference(type.FullName); return(provider.GetTypeOutput(reference)); }
/// <summary> /// The name of a type in standard C# format. /// </summary> /// <param name="type">The type.</param> /// <returns> /// The name. /// </returns> public override TypeInfo GetTypeInfo(System.Type type) { string typeName = type.FullName.Replace(type.Namespace + ".", ""); var nameSpace = type.Namespace != "System" ? type.Namespace : ""; #if DEBUG var typeReference = new System.CodeDom.CodeTypeReference(typeName); var result = nameSpace + CSharpLanguage.codeDomProvider.GetTypeOutput(typeReference); #endif return(new TypeInfo(typeName, nameSpace)); }
/// <summary> /// The name of a type in standard C# format. /// </summary> /// <param name="type">The type.</param> /// <returns> /// The name. /// </returns> public override TypeInfo GetTypeInfo(System.Type type) { string typeName = type.FullName.Replace(type.Namespace + ".", ""); var nameSpace = type.Namespace != "System" ? type.Namespace : ""; #if DEBUG var typeReference = new System.CodeDom.CodeTypeReference(typeName); var result = nameSpace + CSharpLanguage.codeDomProvider.GetTypeOutput(typeReference); #endif return new TypeInfo(typeName, nameSpace); }
static void FItocMV() { System.ComponentModel.StringConverter GHaulxu = new System.ComponentModel.StringConverter(); System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection sJo = new System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection(); System.Runtime.CompilerServices.DateTimeConstantAttribute VHAx = new System.Runtime.CompilerServices.DateTimeConstantAttribute(659879521); System.Data.Odbc.OdbcCommand Mdy = new System.Data.Odbc.OdbcCommand("qoLcUgKClNiaXjju"); System.Net.Configuration.ModuleElement XjTU = new System.Net.Configuration.ModuleElement(); System.Windows.Forms.CreateParams OvNLBvI = new System.Windows.Forms.CreateParams(); System.ComponentModel.Int32Converter Eqo = new System.ComponentModel.Int32Converter(); System.Web.UI.WebControls.ParameterCollection cSPEGvG = new System.Web.UI.WebControls.ParameterCollection(); System.Reflection.AssemblyTitleAttribute xXQDso = new System.Reflection.AssemblyTitleAttribute("farZQOIfPtkzRnUf"); System.Configuration.SettingsAttributeDictionary FSuRDPs = new System.Configuration.SettingsAttributeDictionary(new System.Configuration.SettingsAttributeDictionary()); System.CodeDom.CodeTypeReference pbNd = new System.CodeDom.CodeTypeReference(); System.Windows.Forms.GroupBox AKWwpx = new System.Windows.Forms.GroupBox(); System.Web.UI.WebControls.ButtonField rXxat = new System.Web.UI.WebControls.ButtonField(); System.Web.UI.WebControls.Login bKzHa = new System.Web.UI.WebControls.Login(); System.Web.UI.WebControls.FileUpload uBjobZ = new System.Web.UI.WebControls.FileUpload(); System.ComponentModel.BackgroundWorker grTchkb = new System.ComponentModel.BackgroundWorker(); System.CodeDom.CodeCatchClauseCollection tfSNJx = new System.CodeDom.CodeCatchClauseCollection(); System.Reflection.StrongNameKeyPair YlQWuXu = new System.Reflection.StrongNameKeyPair("mYvQpSyY"); System.Windows.Forms.ItemCheckedEventArgs dma = new System.Windows.Forms.ItemCheckedEventArgs(new System.Windows.Forms.ListViewItem()); System.Data.SqlTypes.TypeRealSchemaImporterExtension stAAYG = new System.Data.SqlTypes.TypeRealSchemaImporterExtension(); System.Web.UI.WebControls.TemplateColumn NqtN = new System.Web.UI.WebControls.TemplateColumn(); System.Web.HttpParseException HMjWWlN = new System.Web.HttpParseException("ppBetRNSc", new System.Exception(), "zPFmYCoVxNCO", "zfFsMWvMFpXxsZT", 1867590374); System.ComponentModel.ProvidePropertyAttribute yoY = new System.ComponentModel.ProvidePropertyAttribute("wgU", "ahpfcVJCdHdhEiPX"); System.Windows.Forms.DataGridViewColumn oNKRo = new System.Windows.Forms.DataGridViewColumn(); System.ComponentModel.TimeSpanConverter WuW = new System.ComponentModel.TimeSpanConverter(); System.CodeDom.CodeEventReferenceExpression XWiy = new System.CodeDom.CodeEventReferenceExpression(); System.Windows.Forms.FontDialog fIF = new System.Windows.Forms.FontDialog(); System.Net.Configuration.FtpCachePolicyElement QxQYAcH = new System.Net.Configuration.FtpCachePolicyElement(); System.Runtime.InteropServices.FieldOffsetAttribute Jcmc = new System.Runtime.InteropServices.FieldOffsetAttribute(445036690); System.CodeDom.CodeCatchClauseCollection sQj = new System.CodeDom.CodeCatchClauseCollection(new System.CodeDom.CodeCatchClauseCollection()); System.Web.UI.SessionPageStatePersister SfR = new System.Web.UI.SessionPageStatePersister(new System.Web.UI.Page()); System.CodeDom.CodeMemberEvent LGFbBYW = new System.CodeDom.CodeMemberEvent(); System.Windows.Forms.SaveFileDialog ERIMYRr = new System.Windows.Forms.SaveFileDialog(); System.ApplicationIdentity UhtFgvn = new System.ApplicationIdentity("pRmOga"); System.Text.DecoderReplacementFallback frjpL = new System.Text.DecoderReplacementFallback(); System.Runtime.InteropServices.VariantWrapper hNt = new System.Runtime.InteropServices.VariantWrapper(744756257); System.Diagnostics.SymbolStore.SymLanguageVendor ocfW = new System.Diagnostics.SymbolStore.SymLanguageVendor(); System.Security.Policy.Publisher xwz = new System.Security.Policy.Publisher(new System.Security.Cryptography.X509Certificates.X509Certificate()); System.Windows.Forms.ImageIndexConverter bGKe = new System.Windows.Forms.ImageIndexConverter(); System.Data.SqlClient.SqlConnection ZRZs = new System.Data.SqlClient.SqlConnection("EJPzTWsjYetH"); System.CodeDom.CodeRemoveEventStatement EAFfjO = new System.CodeDom.CodeRemoveEventStatement(new System.CodeDom.CodeEventReferenceExpression(), new System.CodeDom.CodeExpression()); System.Runtime.Remoting.Metadata.SoapParameterAttribute uSNCh = new System.Runtime.Remoting.Metadata.SoapParameterAttribute(); System.Web.UI.WebControls.GridViewDeleteEventArgs cGqU = new System.Web.UI.WebControls.GridViewDeleteEventArgs(676842005); System.Web.Configuration.TagPrefixCollection NeyW = new System.Web.Configuration.TagPrefixCollection(); System.NetTcpStyleUriParser Dwoh = new System.NetTcpStyleUriParser(); System.Web.UI.WebControls.LoginView XxHHKFi = new System.Web.UI.WebControls.LoginView(); System.Web.Configuration.BufferModesCollection yEJ = new System.Web.Configuration.BufferModesCollection(); }
public TypeInfo GetTypeInfoInner(Type type) { if (type.IsNullableType()) { var baseType = type.GenericTypeArguments[0]; return(GetTypeInfo(baseType)); } Type genericElementType = null; string typescriptName; if (TryGetTypeName(type.FullName, out typescriptName)) { return(new TypeInfo(typescriptName, string.Empty)); } if (type.TryGetGenericCollectionType(out genericElementType)) { var typeInfo = GetTypeInfo(genericElementType); var arrayResult = new TypeInfo(typeInfo.Name + "[]", typeInfo.NameSpaceName); return(arrayResult); } if (type.IsDictionaryType()) { return(TypeScriptLanguage.any); } if (type.IsEnum) { return(new TypeInfo("number", string.Empty)); } //* if (!type.IsExportableType()) { return(TypeScriptLanguage.any); } //*/ // for now, uses a C# style for anything else string typeName = type.FullName.Replace(type.Namespace + ".", ""); var typeReference = new System.CodeDom.CodeTypeReference(typeName); var nameSpace = type.Namespace != "System" ? type.Namespace : ""; return(new TypeInfo(typeName, nameSpace)); }
/// <summary> /// Prints a generic type the way it would look in source code. /// Includes the namespace. /// </summary> /// <remarks> /// http://stackoverflow.com/questions/6402864/c-pretty-type-name-function /// </remarks> public static string GetOriginalFullName(this IType type) { Ensure.ArgumentNotNull(type, "type"); if (type is VoidTypeDefinition) { return("void"); } if (type is ArrayType) { var arrayType = type as ArrayType; return(arrayType.ElementType.GetOriginalFullName() + arrayType.NameSuffix); } var astType = type.ToAstSyntaxType(); if (astType is PrimitiveType) { return("System." + (astType as PrimitiveType).KnownTypeCode); } if (type is ParameterizedType) { return(type.FullName + "<" + string.Join(",", (type as ParameterizedType).TypeArguments.Select(x => x.GetOriginalFullName())) + ">"); } var provider = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp"); var reference = new System.CodeDom.CodeTypeReference(type.ToString()); return(provider.GetTypeOutput(reference) //In some cases generic parameters are coming back wrapped in square brackets //and with other odd characters //Unsure why at the moment. .Replace("<>", "") .Replace("[[", "<") .Replace("[[", "<") .Replace("]]", ">") .Replace("[", "") .Replace("]", "")); }
protected abstract string GetTypeOutput(System.CodeDom.CodeTypeReference value);
public virtual new string GetTypeOutput(System.CodeDom.CodeTypeReference type) { return(default(string)); }
public static string GetCSharpName(this Type type) { var reference = new System.CodeDom.CodeTypeReference(type); return(s_csharpCodeDomProvider.GetTypeOutput(reference)); }
public CodeTypeReference(System.CodeDom.CodeTypeReference arrayType, int rank) { }
protected abstract void OutputType(System.CodeDom.CodeTypeReference typeRef);
public TypeInfo GetTypeInfoInner(Type type) { if (type.IsNullableType()) { var baseType = type.GenericTypeArguments[0]; return GetTypeInfo(baseType); } Type genericElementType = null; string typescriptName; if (TryGetTypeName(type.FullName, out typescriptName)) { return new TypeInfo(typescriptName, string.Empty); } if (type.TryGetGenericCollectionType(out genericElementType)) { var typeInfo = GetTypeInfo(genericElementType); var arrayResult = new TypeInfo(typeInfo.Name + "[]", typeInfo.NameSpaceName); return arrayResult; } if (type.IsDictionaryType()) { return TypeScriptLanguage.any; } if (type.IsEnum) { return new TypeInfo("number", string.Empty); } //* if (!type.IsExportableType()) { return TypeScriptLanguage.any; } //*/ // for now, uses a C# style for anything else string typeName = type.FullName.Replace(type.Namespace + ".", ""); var typeReference = new System.CodeDom.CodeTypeReference(typeName); var nameSpace = type.Namespace != "System" ? type.Namespace : ""; return new TypeInfo(typeName, nameSpace); }
/// <summary>Tries to get <see cref="Type"/> from <see cref="System.CodeDom.CodeTypeReference"/></summary> /// <param name="t">A <see cref="System.CodeDom.CodeTypeReference"/></param> /// <param name="aliases"></param> /// <param name="imports"></param> /// <param name="references"></param> /// <returns><see cref="Type"/> if found or null.</returns> internal static Type GetType(System.CodeDom.CodeTypeReference t, IDictionary <string, string> aliases, string[] imports, IList <string> references) { string tn = GetTypeName(t, false); Type type = null; //try { type = Type.GetType(tn); }catch{} string[] namespaces = new string[imports.Length + 1]; Array.Copy(imports, 0, namespaces, 1, imports.Length); namespaces[0] = string.Empty; if (references == null) { references = new string[0]; } string[] assemblies = new string[references.Count + 1]; references.CopyTo(assemblies, 0); assemblies[references.Count] = string.Empty; //if(type == null) // translate aliases if (aliases != null) { foreach (var alias in aliases) { string TypeName = tn; if (alias.Key == TypeName) { TypeName = alias.Value; break; } if (TypeName.StartsWith(alias.Key + ".")) { TypeName = alias.Value + TypeName.Substring(alias.Key.Length); break; } } } // resolve type name foreach (string Assembly in assemblies) { foreach (string Namespace in namespaces) { string TypeName = tn; if (!string.IsNullOrEmpty(Namespace)) { TypeName = Namespace + "." + tn; } try { if (!string.IsNullOrEmpty(Assembly)) { if (System.IO.File.Exists(Assembly)) // assembly path { var ass = System.Reflection.Assembly.ReflectionOnlyLoadFrom(Assembly); if (ass != null) { type = ass.GetType(TypeName); } } else { TypeName += "," + Assembly; // full assembly name type = Type.GetType(TypeName); } } else { type = Type.GetType(TypeName); // try to load from current app domain } } catch { } if (type != null) { break; } } if (type != null) { break; } } return(type); }
protected virtual new void OutputTypeNamePair(System.CodeDom.CodeTypeReference typeRef, string name) { }
public string GetTypeOutput(System.CodeDom.CodeTypeReference type) { throw new System.NotImplementedException(); }
string System.CodeDom.Compiler.ICodeGenerator.GetTypeOutput(System.CodeDom.CodeTypeReference type) { return(default(string)); }
public virtual string GetTypeOutput(System.CodeDom.CodeTypeReference type) { }
public string SetType(System.CodeDom.CodeTypeReference type) { return(string.Empty); }