コード例 #1
0
 public void ReadTypeParamsFromRevit(Document docTemp)
 {
     //IL_0000: Unknown result type (might be due to invalid IL or missing references)
     //IL_0006: Unknown result type (might be due to invalid IL or missing references)
     //IL_0007: Unknown result type (might be due to invalid IL or missing references)
     //IL_000c: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
     //IL_010a: Unknown result type (might be due to invalid IL or missing references)
     //IL_010f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0110: Unknown result type (might be due to invalid IL or missing references)
     //IL_0111: Unknown result type (might be due to invalid IL or missing references)
     //IL_0116: Unknown result type (might be due to invalid IL or missing references)
     //IL_012f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0130: Unknown result type (might be due to invalid IL or missing references)
     //IL_0135: Unknown result type (might be due to invalid IL or missing references)
     //IL_0148: Unknown result type (might be due to invalid IL or missing references)
     //IL_0149: Unknown result type (might be due to invalid IL or missing references)
     //IL_014e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0167: Unknown result type (might be due to invalid IL or missing references)
     //IL_0168: Unknown result type (might be due to invalid IL or missing references)
     //IL_016d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0196: Unknown result type (might be due to invalid IL or missing references)
     //IL_0197: Unknown result type (might be due to invalid IL or missing references)
     //IL_01b4: Unknown result type (might be due to invalid IL or missing references)
     //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
     //IL_0201: Unknown result type (might be due to invalid IL or missing references)
     //IL_0202: Unknown result type (might be due to invalid IL or missing references)
     //IL_021a: Unknown result type (might be due to invalid IL or missing references)
     //IL_021f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0227: Unknown result type (might be due to invalid IL or missing references)
     //IL_0241: Unknown result type (might be due to invalid IL or missing references)
     //IL_0242: Unknown result type (might be due to invalid IL or missing references)
     //IL_0257: Unknown result type (might be due to invalid IL or missing references)
     //IL_025c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0261: Unknown result type (might be due to invalid IL or missing references)
     //IL_0263: Unknown result type (might be due to invalid IL or missing references)
     //IL_0272: Unknown result type (might be due to invalid IL or missing references)
     //IL_02cf: Unknown result type (might be due to invalid IL or missing references)
     //IL_02e3: Unknown result type (might be due to invalid IL or missing references)
     if ((int)docTemp != 0)
     {
         FamilyManager     familyManager = docTemp.get_FamilyManager();
         List <DataColumn> list          = new List <DataColumn>();
         DataColumn        dataColumn    = new DataColumn("ID", typeof(long));
         list.Add(dataColumn);
         this.m_dtParamsTemplate.Columns.Add(dataColumn);
         this.m_dtParamsTemplate.PrimaryKey = list.ToArray();
         this.m_dtParamsTemplate.Columns.Add("Checked", typeof(bool));
         this.m_dtParamsTemplate.Columns.Add("Name", typeof(string));
         this.m_dtParamsTemplate.Columns.Add("Value", typeof(string));
         this.m_dtParamsTemplate.Columns.Add("Type", typeof(string));
         this.m_dtParamsTemplate.Columns.Add("Group", typeof(string));
         foreach (FamilyParameter parameter in familyManager.get_Parameters())
         {
             string text;
             try
             {
                 text = LabelUtils.GetLabelFor(parameter.get_Definition().get_ParameterType());
             }
             catch
             {
                 text = Enum.GetName(typeof(ParameterType), (object)parameter.get_Definition().get_ParameterType());
             }
             string text2;
             try
             {
                 text2 = LabelUtils.GetLabelFor(parameter.get_Definition().get_ParameterGroup());
             }
             catch
             {
                 text2 = Enum.GetName(typeof(BuiltInParameterGroup), (object)parameter.get_Definition().get_ParameterGroup());
             }
             this.m_dtParamsTemplate.Rows.Add(parameter.get_Id().get_IntegerValue(), true, parameter.get_Definition().get_Name(), 0, text, text2);
         }
         foreach (FamilyType type in familyManager.get_Types())
         {
             this.ParamDict.Add(type.get_Name(), this.m_dtParamsTemplate.Copy());
             bool flag = true;
             foreach (FamilyParameter parameter2 in familyManager.get_Parameters())
             {
                 flag = false;
                 CFamilyParameter cFamilyParameter = new CFamilyParameter(parameter2, type);
                 this.ParamDict[type.get_Name()].Rows.Find(cFamilyParameter.ID)["Value"] = cFamilyParameter.Value;
             }
             if (flag && this.ParamDict.ContainsKey(type.get_Name()))
             {
                 this.ParamDict.Remove(type.get_Name());
             }
         }
         this.m_bParameterRead = true;
         return;
     }
     throw new ArgumentException("Document cannot be null");
 }