Exemple #1
0
        internal AcadXDataValue FriendAdd(short vintXDataType, object vvarXDataValue)
        {
            AcadXDataValue dobjAcadXDataValue2 = new AcadXDataValue();

            dobjAcadXDataValue2.FriendLetXDataType        = vintXDataType;
            dobjAcadXDataValue2.FriendLetXDataValue       = RuntimeHelpers.GetObjectValue(vvarXDataValue);
            dobjAcadXDataValue2.FriendLetNodeParentID     = base.NodeID;
            dobjAcadXDataValue2.FriendLetApplicationIndex = mlngApplicationIndex;
            dobjAcadXDataValue2.FriendLetDocumentIndex    = mlngDocumentIndex;
            dobjAcadXDataValue2.FriendLetDatabaseIndex    = mlngDatabaseIndex;
            checked
            {
                mlngXDataIndex++;
                dobjAcadXDataValue2.FriendLetXDataIndex = mlngXDataIndex;
                mcolClass.Add("K" + Conversions.ToString(mlngXDataIndex), dobjAcadXDataValue2);
                AcadXDataValue FriendAdd = dobjAcadXDataValue2;
                dobjAcadXDataValue2 = null;
                return(FriendAdd);
            }
        }
Exemple #2
0
        public void GetXData(ref object rvarXDataType, ref object rvarXDataValue)
        {
            int dlngCount = mcolClass.Count;
            int dlngIdx2  = 0;

            checked
            {
                object[] davarXDataType  = new object[dlngCount + dlngIdx2 + 1];
                object[] davarXDataValue = new object[dlngCount + dlngIdx2 + 1];
                davarXDataType[dlngIdx2]  = (short)1001;
                davarXDataValue[dlngIdx2] = mstrAppName;
                dlngIdx2++;
                IEnumerator    enumerator = default(IEnumerator);
                AcadXDataValue dobjAcadXDataValue2;
                try
                {
                    enumerator = GetValues().GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        dobjAcadXDataValue2 = (AcadXDataValue)enumerator.Current;
                        AcadXDataValue acadXDataValue = dobjAcadXDataValue2;
                        davarXDataType[dlngIdx2]  = acadXDataValue.XDataType;
                        davarXDataValue[dlngIdx2] = RuntimeHelpers.GetObjectValue(acadXDataValue.XDataValue);
                        acadXDataValue            = null;
                        dlngIdx2++;
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        (enumerator as IDisposable).Dispose();
                    }
                }
                rvarXDataType       = Support.CopyArray(davarXDataType);
                rvarXDataValue      = Support.CopyArray(davarXDataValue);
                dobjAcadXDataValue2 = null;
            }
        }