예제 #1
0
        public static double AsDouble(this IDataElement evt)
        {
            if ((evt == null) || (evt.Value == null))
            {
                return(0);
            }

            if (evt.Value is string)
            {
                if ((string)evt.Value == string.Empty)
                {
                    return(0);
                }

                try
                {
                    return(double.Parse(evt.Value as string, NumberStyles.Float, NumberFormatInfo.InvariantInfo));
                }
                catch
                {
                    return(0);
                }
            }
            else
            {
                try
                {
                    return(Convert.ToDouble(evt.Value));
                }
                catch
                {
                    return(0);
                }
            }
        }
예제 #2
0
        public static int AsInt(this IDataElement evt)
        {
            if ((evt == null) || (evt.Value == null))
            {
                return(0);
            }

            if (evt.Value is string)
            {
                if ((string)evt.Value == string.Empty)
                {
                    return(0);
                }

                try
                {
                    return(int.Parse(evt.Value as string, NumberStyles.Integer, NumberFormatInfo.InvariantInfo));
                }
                catch
                {
                    return(0);
                }
            }
            else
            {
                try
                {
                    return(Convert.ToInt32(evt.Value));
                }
                catch
                {
                    return(0);
                }
            }
        }
예제 #3
0
        public ISpatialReference getSpatialRef(string catalogpath)
        {
            object            dtype    = "";
            ISpatialReference spRef    = null;
            IDataElement      dtE      = gp.GetDataElement(catalogpath, ref dtype);
            string            datatype = dtE.Type.ToLower();

            Console.WriteLine(datatype);
            try
            {
                if (datatype.IndexOf("raster") > -1)
                {
                    IGeoDataset rstd = (IGeoDataset)getRasterDataset(catalogpath);
                    spRef = rstd.SpatialReference;
                }
                else
                {
                    IGeoDataset ftrs = (IGeoDataset)getFeatureClass(catalogpath);
                    spRef = ftrs.SpatialReference;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Error: " + e.ToString());
            }
            return(spRef);
        }
예제 #4
0
        // --------------------------------------------------
        // EXECUTION
        // --------------------------------------------------

        #region Execution

        /// <summary>
        /// Executes customly this instance.
        /// </summary>
        /// <param name="scope">The scope to consider.</param>
        /// <param name="scriptVariableSet">The script variable set to use.</param>
        /// <param name="item">The item to use.</param>
        /// <param name="dataElement">The element to use.</param>
        /// <param name="objects">The objects to use.</param>
        /// <returns>The log of check log.</returns>
        protected override IBdoLog CustomExecute(
            IBdoScope scope = null,
            IScriptVariableSet scriptVariableSet = null,
            Object item = null,
            IDataElement dataElement = null,
            params object[] objects)
        {
            var log = new BdoLog();

            //if (item!=null && ParameterDetail!=null)
            //{
            //    String aFormat = (ParameterDetail.GetElementItem() as string ?? string.Empty);
            //    String aString = ((item as string) ?? string.Empty);

            //    if (!string.IsNullOrEmpty(aFormat))
            //    {
            //        if (!String.Format(aString, aFormat).KeyEquals(aString))
            //        {
            //            log.AddError("Bad format").ResultCode = "ERROR_FORMAT:" + (dataElement != null ? dataElement.Key() : string.Empty);
            //        }
            //    }
            //}

            return(log);
        }
예제 #5
0
        /// <summary>
        /// Return List editor tracking fields, If not enable return empty list.
        /// </summary>
        /// <param name="layerPath">example: D:\Data.gdb\PointLayer, D:\Data.sde\myDataset\PointLayer </param>
        /// <param name="createUserField"></param>
        /// <param name="createDateField"></param>
        /// <param name="lastEditUserField"></param>
        /// <param name="lastEditDateField"></param>
        /// <returns>List editor tracking field, order in this order (createUserField, createDateField, lastEditUserField, lastEditDateField)</returns>
        public static List <string> GetEditorTrackingFieldNames(string layerPath
                                                                , out string createUserField, out string createDateField
                                                                , out string lastEditUserField, out string lastEditDateField)
        {
            List <string> editorTrackingFields = new List <string>();

            createUserField   = "";
            createDateField   = "";
            lastEditUserField = "";
            lastEditDateField = "";

            Geoprocessor      GP           = new Geoprocessor();
            object            DataType     = "";
            IDataElement      DataElement  = GP.GetDataElement(layerPath, ref DataType);
            IDEEditorTracking ideEditTrack = (IDEEditorTracking)DataElement;

            if (ideEditTrack.EditorTrackingEnabled == true)
            {
                createUserField   = ideEditTrack.CreatorFieldName;
                createDateField   = ideEditTrack.CreatedAtFieldName;
                lastEditUserField = ideEditTrack.EditorFieldName;
                lastEditDateField = ideEditTrack.EditedAtFieldName;
            }

            return(editorTrackingFields);
        }
 public String GetDataName(object data)
 {
     if (data is IDataElement)
     {
         IDataElement dataElement = (IDataElement)data;
         return(dataElement.Name);
     }
     else if (data is IFields)
     {
         return("Field Changes");
     }
     else if (data is IField)
     {
         IField field = (IField)data;
         return(field.Name);
     }
     else if (data is IDomain)
     {
         IDomain domain = (IDomain)data;
         return(domain.Name);
     }
     else
     {
         return("Unknown type");
     }
 }
예제 #7
0
        /// <summary>
        /// Sets the constraint parameter value.
        /// </summary>
        /// <param name="constraintName">The name of the constraint to return.</param>
        /// <param name="definitionUniqueId">The name of the definition to return.</param>
        /// <param name="parameterName">The name of the parameter to return.</param>
        /// <param name="dataValueType">The name of the parameter to return.</param>
        /// <returns>Returns the specified constrainst parameter.</returns>
        public IDataElement AddConstraintParameter(
            string constraintName,
            string definitionUniqueId    = null,
            string parameterName         = null,
            DataValueTypes dataValueType = DataValueTypes.Any)
        {
            IDataElement dataElement = null;

            IBdoRoutineConfiguration routine = GetConstraint(constraintName);

            if ((routine == null) || (!routine.DefinitionUniqueId.KeyEquals(definitionUniqueId)))
            {
                routine = AddConstraint(constraintName, definitionUniqueId);
            }

            if (routine != null)
            {
                if (parameterName == null && routine.Count > 0)
                {
                    dataElement = routine[0];
                }
                else
                {
                    dataElement = routine[parameterName];
                }
                if (dataElement == null)
                {
                    routine.Add(dataElement = ElementFactory.CreateScalar(
                                    parameterName,
                                    dataValueType == DataValueTypes.Any ? dataValueType.GetValueType() : dataValueType));
                }
            }

            return(dataElement);
        }
예제 #8
0
        public static bool AsBool(this IDataElement evt)
        {
            if ((evt == null) || (evt.Value == null))
            {
                return(false);
            }

            if (evt.Value is string)
            {
                if ((string)evt.Value == string.Empty)
                {
                    return(false);
                }

                try
                {
                    return(bool.Parse(evt.Value as string));
                }
                catch
                {
                    return(false);
                }
            }
            else
            {
                try
                {
                    return(Convert.ToBoolean(evt.Value));
                }
                catch
                {
                    return(false);
                }
            }
        }
예제 #9
0
        public NetworkDataset(string configXML, IDataset osmDataset, string ndsName, IGPMessages messages, ITrackCancel trackCancel)
        {
            _xml = new NetworkDatasetXML(configXML, RESMGR);

            _osmDataset  = osmDataset;
            _ndsName     = ndsName;
            _messages    = messages;
            _trackCancel = trackCancel;

            IDataElement deOSM = GPUtil.MakeDataElementFromNameObject(_osmDataset.FullName);

            _dsPath = deOSM.CatalogPath;

            _osmLineName  = _osmDataset.Name + "_osm_ln";
            _osmLinePath  = _dsPath + "\\" + _osmLineName;
            _osmPointName = _osmDataset.Name + "_osm_pt";
            _osmPointPath = _dsPath + "\\" + _osmPointName;

            // Get the extent from the point feature class
            // NOTE: the feature dataset is not used for this because exceptions occur (SDE only)
            //       if a feature class was recently deleted from the feature dataset.
            IFeatureClass fcPoint = ((IFeatureWorkspace)_osmDataset.Workspace).OpenFeatureClass(_osmPointName);
            IGeoDataset   gds     = (IGeoDataset)fcPoint;

            _extent           = gds.Extent;
            _spatialReference = gds.SpatialReference;
        }
예제 #10
0
        /// <summary>
        /// commented the below 2 methods as it implemets the same as set method acceptiong string as 2nd param
        /// </summary>

        public NetworkMessage Set <T>(DataElementId id, IDataElement <T> element) where  T : class
        {
            if (element != null)
            {
                return(Set(id, element.ToByteArray()));
            }
            return(this);
        }
예제 #11
0
        /// <summary>
        /// Check the specified item.
        /// </summary>
        /// <param name="dataElement">The element to consider.</param>
        /// <param name="specificationAreas">The specification areas to consider.</param>
        /// <returns>The log of check log.</returns>
        public override IBdoLog CheckElement(
            IDataElement dataElement,
            string[] specificationAreas = null)
        {
            // we check that the entity unique name is available

            return(new BdoLog());
        }
예제 #12
0
        public static bool IsValid(IDataElement dataElement)

        {
            bool isValid = DataElementBitValidation.IsValid(dataElement.Bit) &&
                           DataElementNameValidation.IsValid(dataElement.Name) &&
                           DataElementValueValidation.IsValid(dataElement.Value);

            return isValid;
        }
예제 #13
0
파일: TreeView.cs 프로젝트: gethernet/smm
        public BranchTagTree(IDataElement iRootElement, CopyType eType, string sRootProject, string sURLVersionPath)
        {
            m_iRootElement    = iRootElement;
            m_eType           = eType;
            m_sRootProject    = sRootProject;
            m_sURLVersionPath = sURLVersionPath;

            m_bIgnoreExistingTargets = false;
        }
예제 #14
0
 /// <summary>
 /// Instantiates a new instance of the DataReference class.
 /// </summary>
 /// <param name="dataHandlerUniqueName">The handler unique name to consider.</param>
 /// <param name="sourceElement">The source element to consider.</param>
 /// <param name="dynamicObject">The dynamic object of this instance.</param>
 public DataReferenceDto(
     string dataHandlerUniqueName,
     IDataElement sourceElement,
     object dynamicObject) : this()
 {
     DataHandlerUniqueName = dataHandlerUniqueName;
     SourceElement         = sourceElement as DataElement;
     PathDetail.Update(ElementFactory.CreateSetFromObject <DataElementSet>(dynamicObject));
 }
예제 #15
0
        // --------------------------------------------------
        // CHECKING
        // --------------------------------------------------

        #region Checking

        /// <summary>
        /// Check value.
        /// </summary>
        /// <param name="item">The item to consider.</param>
        /// <param name="dataElement">The element to consider.</param>
        /// <param name="isDeepCheck">Indicates whether other rules than allowed and forbidden values are checked.</param>
        /// <returns>The log of check log.</returns>
        public IBdoLog CheckItem(
            object item,
            IDataElement dataElement,
            bool isDeepCheck = false)
        {
            var log = new BdoLog();

            return(log);
        }
예제 #16
0
 /// <summary>
 /// Instantiates a new instance of the DataReference class.
 /// </summary>
 /// <param name="dataHandlerUniqueName">The handler unique name to consider.</param>
 /// <param name="sourceElement">The source element to consider.</param>
 /// <param name="pathDetail">The path detail to consider.</param>
 public DataReferenceDto(
     string dataHandlerUniqueName,
     IDataElement sourceElement = null,
     IDataElementSet pathDetail = null) : this()
 {
     DataHandlerUniqueName = dataHandlerUniqueName;
     SourceElement         = sourceElement as DataElement;
     PathDetail            = pathDetail as DataElementSet;
 }
 public ConditionDisplayParameterString(string name, IDataElement dataElement, RuleObject.OnExecuteHandler executeEventHandler, Workshare.Policy.PolicyType type)
     : base(name, null, type)
 {
     AddExecuteEventHandler(executeEventHandler);
     if (dataElement != null)
     {
         Object = dataElement;
         Text = GetDisplayName();
     }
 }
예제 #18
0
        public void refreshCatalog(string path)
        {
            IGPUtilities2 gpUtl = new GPUtilitiesClass() as IGPUtilities2;
            IGeoProcessor gp    = getGP();
            IGPDataType   nm    = new GPDateTypeClass();
            object        dt    = "";
            IDataElement  dtE   = gp.GetDataElement(path, ref dt);

            gpUtl.RefreshCatalog(dtE);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataElement"></param>
        /// <returns></returns>
        public ConditionDisplayParameterFileName(IDataElement dataElement, RuleObject.OnExecuteHandler executeEventHandler, Workshare.Policy.PolicyType type)
            : base(Properties.Resources.IDS_EXPRESSION_PARAM_FILENAME_DEFAULT, null, type)
        {
            AddExecuteEventHandler(executeEventHandler);

            if (dataElement != null)
            {
                Object = dataElement;
                Text = GetDisplayName();
            }
        }
        public ConditionDisplayParameterContent(IDataElement contentElement, RuleObject.OnExecuteHandler executeEventHandler, Workshare.Policy.PolicyType type)
            : base(Properties.Resources.IDS_EXPRESSION_CONTENTPARAM_DEFAULT, contentElement, type)
        {
            AddExecuteEventHandler(executeEventHandler);

            if (contentElement != null)
            {
                this.Object = contentElement;
                this.Text = GetDisplayName();
            }
        }
예제 #21
0
        public NetworkTurns(string turnClassName, IDataset osmDataset, INetworkDataset nds)
        {
            _turnClassName  = turnClassName;
            _osmDataset     = osmDataset;
            _networkDataset = nds;

            IGPUtilities gpUtil = new GPUtilitiesClass();
            IDataElement de     = gpUtil.MakeDataElementFromNameObject(osmDataset.FullName);

            _dsPath = de.CatalogPath;
        }
예제 #22
0
 public DataString(IDataElement parent, string valueString) : this(parent)
 {
     if (valueString.StartsWith("\"") && valueString.EndsWith("\""))
     {
         _s = valueString.Substring(1, valueString.Length - 2);
     }
     else
     {
         _s = valueString;
     }
 }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="dataElement"></param>
		/// <param name="executeEventHandler"></param>
		/// <param name="type"> </param>
		public ConditionDisplayParameterTotalAttachmentSize(IDataElement dataElement, OnExecuteHandler executeEventHandler, Policy.PolicyType type)
			: base(Properties.Resources.IDS_EXPRESSION_PARAM_TOTALATTACHMENTSIZE_DEFAULT, null, type)
		{
			AddExecuteEventHandler(executeEventHandler);

			if (dataElement != null)
			{
				Object = dataElement;
				Text = GetDisplayName();
			}
		}
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataElement"></param>
        /// <param name="executeEventHandler"></param>
        public ConditionDisplayParameterCustomPropertyValue(CustomPropertyType customPropertyType, IDataElement dataElement, RuleObject.OnExecuteHandler executeEventHandler, Workshare.Policy.PolicyType type)
            : base(Properties.Resources.IDS_EXPRESSION_PARAM_CUSTOMPROPERTYVALUE_DEFAULT, null, type)
        {
            AddExecuteEventHandler(executeEventHandler);
            m_type = customPropertyType;

            if (dataElement != null)
            {
                Object = dataElement;
                Text = GetDisplayName();
            }
        }
예제 #25
0
        public void Parse(CallerContext context)
        {
            FullyParsed = false;

            var garbageCollectOldLatencyMode = GCSettings.LatencyMode;

            try
            {
                GCSettings.LatencyMode = GCLatencyMode.LowLatency;

                RootBlock = new DataBlock(null);
                IDataElement target = RootBlock;

                if (ReportProgress(context))
                {
                    return;
                }

                while (_stream.EndOfStream == false)
                {
                    if (ReportProgress(context))
                    {
                        return;
                    }

                    var line      = ReadLine();
                    var splitLine = SplitLine(line);

                    foreach (var subLine in splitLine)
                    {
                        target = target.ProcessLine(subLine);
                    }

                    if (NbReadLines == 5 || _stream.EndOfStream)
                    {
                        CheckFileValidity();
                    }
                }

                if (RootBlock.Children.Count == 0)
                {
                    throw new InvalidOperationException("Could not read any data. Possibly empty file");
                }

                Map = new Mapping(_rootBlock);

                FullyParsed = true;
            }
            finally
            {
                GCSettings.LatencyMode = garbageCollectOldLatencyMode;
            }
        }
		public ConditionDisplayParameterHiddenDataInPDF(IDataElement dataElement, RuleObject.OnExecuteHandler executeEventHandler, List<ConditionUnitFactory.FileHiddenDataType> enumTypes, Workshare.Policy.PolicyType type)
			: base(Properties.Resources.IDS_EXPRESSION_PARAM_HIDDENDATA_DEFAULT, null, type)
		{
			AddExecuteEventHandler(executeEventHandler);

			m_enumTypes = enumTypes;

			if (dataElement != null)
			{
				Object = dataElement;
				Text = GetDisplayName();
			}
		}
        public ConditionDisplayParameterAddressType(IDataElement dataElement, RuleObject.OnExecuteHandler executeEventHandler, List<AddressTypes> enumAddressTypes, Workshare.Policy.PolicyType type)
            : base(Properties.Resources.IDS_EXPRESSION_ADDRESSTYPE_DEFAULT, null, type)
        {
            AddExecuteEventHandler(executeEventHandler);

            m_enumAddressTypes = enumAddressTypes;

            if (dataElement != null)
            {
                Object = dataElement;
                Text = GetDisplayName();
            }
        }
예제 #28
0
        public void UpdateParameters(IArray paramvalues, IGPEnvironmentManager pEnvMgr)
        {
            IGPUtilities2 gpUtil = null;

            try
            {
                gpUtil = new GPUtilitiesClass();

                IGPParameter targetDatasetParameter = paramvalues.get_Element(in_osmFeatureDataset) as IGPParameter;
                IDataElement dataElement            = gpUtil.UnpackGPValue(targetDatasetParameter) as IDataElement;
                string       osmDatasetPath         = dataElement.CatalogPath;

                IGPParameter gppNetworkDataset = paramvalues.get_Element(out_NetworkDataset) as IGPParameter;
                IGPValue     gpvNetworkDataset = gpUtil.UnpackGPValue(gppNetworkDataset);
                string       ndsPath           = gpvNetworkDataset.GetAsText();

                string ndsDir = string.Empty;
                if (!string.IsNullOrEmpty(ndsPath))
                {
                    ndsDir = System.IO.Path.GetDirectoryName(ndsPath);
                }

                if (!ndsDir.Equals(osmDatasetPath))
                {
                    string ndsName = System.IO.Path.GetFileName(ndsPath);
                    if (string.IsNullOrEmpty(ndsName))
                    {
                        ndsName = _defaultNetworkDatasetName;
                    }

                    ndsName = System.IO.Path.GetFileName(osmDatasetPath) + "_" + ndsName;
                    gpvNetworkDataset.SetAsText(System.IO.Path.Combine(osmDatasetPath, ndsName));
                    gpUtil.PackGPValue(gpvNetworkDataset, gppNetworkDataset);
                }
            }
            finally
            {
                if (gpUtil != null)
                {
                    ComReleaser.ReleaseCOMObject(gpUtil);
                }
            }
        }
예제 #29
0
파일: TreeView.cs 프로젝트: gethernet/smm
        /// <summary>
        /// Reverts recursively the changes, made before a tree tag/branch
        /// </summary>
        /// <returns>true, if successful</returns>
        private bool RevertSubCopies(IDataElement iDataElement)
        {
            // traverse through childs first
            foreach (IDataElement itm in iDataElement.DataChilds)
            {
                if (!RevertSubCopies(itm))
                {
                    return(false);
                }
            }

            // reset temporary version mappings
            if (iDataElement is External)
            {
                External ext = (External)iDataElement;
                if (ext.m_sURLVersionBase.Length > 0)
                {
                    ext.m_sURLVersionPath = ext.m_sURLVersionPathTemp;
                    ext.m_sPegRevision    = ext.m_sPegRevisionTemp;
                    ext.m_sOpRevision     = ext.m_sOpRevisionTemp;

                    // update view
                    if (iDataElement.TreeItem != null)
                    {
                        MainWindow wnd = (MainWindow)m_iRootElement.MainWnd;
                        TreeItem   ti  = (TreeItem)iDataElement.TreeItem;
                        ti.VersionPath = ti.VersionPath;
                        ti.Revision    = ti.Revision;
                        wnd.RefreshTreeView();
                    }
                }
            }

            // apply external changes
            if (iDataElement is FolderWithExternals)
            {
                FolderWithExternals fld = (FolderWithExternals)iDataElement;
                fld.ApplyChanges(false, true, true);
            }

            return(true);
        }
예제 #30
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="layerPath">example: D:\Data.gdb\PointLayer, D:\Data.sde\myDataset\PointLayer </param>
        /// <returns></returns>
        public static bool IsEnableEditorTrackingByLayerPath(string layerPath)
        {
            // Example : @"D:\Data.gdb\PointLayer";

            // Case connection in ArcMap
            // Example : @"Database Connections\mySdeDB.sde\ShopPoint";

            Geoprocessor      GP           = new Geoprocessor();
            object            DataType     = "";
            IDataElement      DataElement  = GP.GetDataElement(layerPath, ref DataType);
            IDEEditorTracking ideEditTrack = (IDEEditorTracking)DataElement;

            if (ideEditTrack.EditorTrackingEnabled == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #31
0
        // --------------------------------------------------
        // EXECUTION
        // --------------------------------------------------

        #region Execution

        /// <summary>
        /// Executes customly this instance.
        /// </summary>
        /// <param name="scope">The scope to consider.</param>
        /// <param name="scriptVariableSet">The script variable set to use.</param>
        /// <param name="item">The item to use.</param>
        /// <param name="dataElement">The element to use.</param>
        /// <param name="objects">The objects to use.</param>
        /// <returns>The log of check log.</returns>
        protected override IBdoLog CustomExecute(
            IBdoScope scope = null,
            IScriptVariableSet scriptVariableSet = null,
            Object item = null,
            IDataElement dataElement = null,
            params object[] objects)
        {
            var log = new BdoLog();

            if (dataElement == null)
            {
                log.AddError("Element missing");
            }
            else if (dataElement.Items.Count == 0 || dataElement.Items[0] == null)
            {
                log.AddError("Item required").ResultCode = "ERROR_ITEMREQUIRED:" + dataElement.Key();
            }
            else if (dataElement.ValueType.IsScalar() && dataElement.Items.Count == 1 && string.IsNullOrEmpty(dataElement.GetValue().ToNotNullString()))
            {
                log.AddError("Item required").ResultCode = "ERROR_ITEMREQUIRED:" + dataElement.Key();
            }

            return(log);
        }
예제 #32
0
 protected virtual string GetSuccessResultMessage(IDataElement template)
 {
     return($"{Name} {template} validated successfully.");
 }
예제 #33
0
 private void WriteDataItems(IDataElement parent,  IPolicyObjectCollection<IDataItem> items)
 {
     switch (parent.Type)
     {
         case DataType.BooleanArray:
         case DataType.DateArray:
         case DataType.DateTimeArray:
         case DataType.DoubleArray:
         case DataType.LongArray:
         case DataType.StringArray:
             string argumentvalue = parent.Identifier.ToString();
             NxArgument argument = new NxArgument(NxUtils.ConvertToStringArray(items), false);
             foreach (NxPolicySet policyset in m_policysets.PolicySets)
             {
                 policyset.CurrentPolicy.Append(new NxObjectLookup(argumentvalue, "helper", NxUtils.DataTypeToMember(parent.Type), argument));
             }
             break;
     }                        
 }
 public XmlDataElementCatalogueWriter(XmlNode xmlParentNode, XmlPolicyCatalogueWriter policyCatalogueWriter, IDataElement dataElement)
     : base(xmlParentNode, policyCatalogueWriter)
 {
     m_dataElement = dataElement;
 }
예제 #35
0
        private void WriteDataSource(IDataElement parent, IDataSource datasource)
        {
            List<NxArgument> args = new List<NxArgument>();
            m_policysets.AddCondition(datasource, datasource.Class);
            foreach (IParameter param in datasource.Method.Parameters)
            {
                IDataElement element = param.Value;
                string argumentvalue = "";
                bool valueid = true;
                switch (element.Type)
                {
                    case DataType.Long:
                    case DataType.Boolean:
                    case DataType.Date:
                    case DataType.DateTime:
					case DataType.Double:
                		argumentvalue = element.Identifier.ToString();
						foreach (NxPolicySet policyset in m_policysets.PolicySets)
						{
							IDataItem di = element.Data as IDataItem;
							if (di != null)
							{
								policyset.Policies[policyset.Policies.Count - 1].Append(new NxPrimitive(element.Identifier.ToString(), element.Type, Convert.ToString(di.Value, CultureInfo.InvariantCulture)));
							}
							else
							{
								policyset.Policies[policyset.Policies.Count - 1].Append(new NxPrimitive(element.Identifier.ToString(), element.Type, Convert.ToString(element.Data, CultureInfo.InvariantCulture)));
							}
						}
                        break;
                    case DataType.String:
                        valueid = false;

                        if (element.Data is String)
                            argumentvalue = element.Data as string;
                        else
                        {
                            IDataItem di = (IDataItem)element.Data;
                            argumentvalue = di.Value as string;
                        }                       
                        break;
                    case DataType.BooleanArray:
                    case DataType.DateArray:
                    case DataType.DateTimeArray:
                    case DataType.DoubleArray:
                    case DataType.LongArray:
                    case DataType.StringArray:
                        argumentvalue = Guid.NewGuid().ToString();
                        NxArgument argument = new NxArgument(NxUtils.ConvertToStringArray(element.Data as IPolicyObjectCollection<IDataItem>), false);
                        foreach (NxPolicySet policyset in m_policysets.PolicySets)
                        {
                            policyset.CurrentPolicy.Append(new NxObjectLookup(argumentvalue, "helper", NxUtils.DataTypeToMember(element.Type), argument));
                        }
                        break;    
                    case DataType.Object:
                        argumentvalue = element.Identifier.ToString();
                        WriteDataSource(element, element.Data as IDataSource);
                        break;
                    case DataType.ObjectArray:
                        argumentvalue = element.Identifier.ToString();
                        WriteDataSource(element, element.Data as IDataSource);

                        break;
                    case DataType.Empty:
                        argumentvalue = Guid.NewGuid().ToString();
                        foreach (NxPolicySet policyset in m_policysets.PolicySets)
                        {
                            policyset.CurrentPolicy.Append(new NxObjectLookup(argumentvalue, "this", "GetNull"));
                        }
                        break;
                }
                args.Add(new NxArgument(argumentvalue, valueid));
            }
            foreach (NxPolicySet policyset in m_policysets.PolicySets)
            {
                //Parent Identifier might be a problem!
                policyset.CurrentPolicy.Append(new NxObjectLookup(parent.Identifier.ToString(), datasource.Class, datasource.Method.Name.Value, args));
            }
        }
예제 #36
0
        // --------------------------------------------------
        // ACCESSORS
        // --------------------------------------------------

        #region Accessors

        /// <summary>
        /// Check the specified item.
        /// </summary>
        /// <param name="item">The item to consider.</param>
        /// <param name="dataElement">The element to consider.</param>
        /// <returns>The log of check log.</returns>
        public override IBdoLog CheckItem(
            object item,
            IDataElement dataElement = null)
        {
            return(new BdoLog());
        }
        private void WriteDataElementDataItem(XmlNode xmlParentNode, IDataElement dataElement)
        {
            if (!IsDataItem(dataElement) && !IsDataSource(dataElement) && !IsDataItemArray(dataElement) && !IsDataSourceArray(dataElement))
                return;

            new XmlDataElementCatalogueWriter(xmlParentNode, m_policyCatalogueWriter, dataElement).Write();
        }
예제 #38
0
        /// <summary>
        /// Removes a DataElement from a policy set's master catalogue. 
        /// 
        /// This should only be called for DataElements that are part of a collection, ie
        /// Action.DataElements and DataElements that are method parameters
        /// </summary>
        /// <param name="policySet">The policy set from whose catalogue we will remove the DataElement</param>
        /// <param name="dataElement">The DataElement to remove</param>
        private static void RemoveDataElement(IPolicySet policySet, IDataElement dataElement)
        {
            if (null == policySet || null == dataElement)
            {
                return;
            }

            if (dataElement.Data is IDataSource)
            {
                IDataSource source = dataElement.Data as IDataSource;
                foreach (IParameter parameter in source.Method.Parameters)
                {
                    RemoveDataElement(policySet, parameter.Value);
                }
            }

            policySet.MasterCatalogue.DataElements.Remove(dataElement);
        }
예제 #39
0
        private void SetExecutionDataElemProps(IDataElement elem)
        {
            bool executePropValue, allowOverride;
            switch( m_addEditActionsForm.ExecutionOption)
            {
                case ExecutionOption.AlwaysExecute:
                    executePropValue = true;
                    allowOverride = false;
                    break;
                case ExecutionOption.OverridableDefaultTrue:
                    executePropValue = true;
                    allowOverride = true;
                    break;
                case ExecutionOption.OverridableDefaultFalse:
                    executePropValue = false;
                    allowOverride = true;
                    break;
                default:
                    Debug.Assert(false, "Unexpected enumeration value for data element.");
                    return;
            }

            elem["allowoverride"].Value = allowOverride.ToString(CultureInfo.InvariantCulture);
            elem.Data =
                   DataItem.CreateDataItem(new NonTranslateableLanguageItem(String.Empty), DataType.Boolean,
                                           executePropValue);
        }
 public ConditionDisplayParameterPropertyValue(IDataElement dataElement, OnExecuteHandler executeEventHandler, Workshare.Policy.PolicyType type) :
     base(Properties.Resources.FILE_PROPERTY_VALUE, dataElement, executeEventHandler, type)
 {
 }
예제 #41
0
 public XmlDataElementsWriter(XmlNode xmlParentNode, IDataElement dataElement)
     : base(xmlParentNode)
 {
     m_dataElements = new PolicyObjectCollection<IDataElement>();
     m_dataElements.Add(dataElement);
 }
예제 #42
0
 protected virtual string GetResultMessage(IDataElement template, IRule rule, IRuleValidationResult result)
 {
     return($"[{rule.GetType().Name}] {result.Message}");
 }
예제 #43
0
 private void CopyValue(Parameter rhs, bool readOnly, bool createNewId)
 {
     DataElement elem = rhs.Value as DataElement;
     m_value = elem.DeepCopy(readOnly, createNewId) as IDataElement;
 }
예제 #44
0
        public void Execute(IArray paramvalues, ITrackCancel TrackCancel, IGPEnvironmentManager envMgr, IGPMessages message)
        {
            IAoInitialize     aoInitialize = new AoInitializeClass();
            esriLicenseStatus naStatus     = esriLicenseStatus.esriLicenseUnavailable;

            IGPUtilities2 gpUtil     = null;
            IDataset      osmDataset = null;

            try
            {
                if (!aoInitialize.IsExtensionCheckedOut(esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork))
                {
                    naStatus = aoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork);
                }

                gpUtil = new GPUtilitiesClass();

                // OSM Dataset Param
                IGPParameter osmDatasetParam = paramvalues.get_Element(in_osmFeatureDataset) as IGPParameter;
                IDEDataset2  osmDEDataset    = gpUtil.UnpackGPValue(osmDatasetParam) as IDEDataset2;
                if (osmDEDataset == null)
                {
                    message.AddError(120048, string.Format(resourceManager.GetString("GPTools_NullPointerParameterType"), osmDatasetParam.Name));
                    return;
                }

                osmDataset = gpUtil.OpenDatasetFromLocation(((IDataElement)osmDEDataset).CatalogPath) as IDataset;

                // Network Config File Param
                IGPParameter osmNetConfigParam = paramvalues.get_Element(in_NetworkConfigurationFile) as IGPParameter;
                IGPValue     osmNetConfigFile  = gpUtil.UnpackGPValue(osmNetConfigParam) as IGPValue;
                if ((osmNetConfigFile == null) || (string.IsNullOrEmpty(osmNetConfigFile.GetAsText())))
                {
                    message.AddError(120048, string.Format(resourceManager.GetString("GPTools_NullPointerParameterType"), osmNetConfigParam.Name));
                    return;
                }

                // Target Network Dataset Param
                IGPParameter ndsParam = paramvalues.get_Element(out_NetworkDataset) as IGPParameter;
                IDataElement deNDS    = gpUtil.UnpackGPValue(ndsParam) as IDataElement;
                if (deNDS == null)
                {
                    message.AddError(120048, string.Format(resourceManager.GetString("GPTools_NullPointerParameterType"), ndsParam.Name));
                    return;
                }

                // Create Network Dataset
                using (NetworkDataset nd = new NetworkDataset(osmNetConfigFile.GetAsText(), osmDataset, deNDS.Name, message, TrackCancel))
                {
                    if (nd.CanCreateNetworkDataset())
                    {
                        nd.CreateNetworkDataset();
                    }
                }
            }
            catch (UserCancelException ex)
            {
                message.AddWarning(ex.Message);
            }
            catch (Exception ex)
            {
                message.AddError(120008, ex.Message);
#if DEBUG
                message.AddError(120008, ex.StackTrace);
#endif
            }
            finally
            {
                if (osmDataset != null)
                {
                    ComReleaser.ReleaseCOMObject(osmDataset);
                }

                if (naStatus == esriLicenseStatus.esriLicenseCheckedOut)
                {
                    aoInitialize.CheckInExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork);
                }

                if (gpUtil != null)
                {
                    ComReleaser.ReleaseCOMObject(gpUtil);
                }

                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
            }
        }
 private bool IsDataSourceArray(IDataElement dataElement)
 {
     IPolicyObjectCollection<IDataSource> dataSourceArray = dataElement.Data as IPolicyObjectCollection<IDataSource>;
     return (dataSourceArray != null);
 }
예제 #46
0
 private void WriteDataElement(System.IO.StreamWriter writer, IDataElement dataElement)
 {
     if (dataElement.Data is IDataItem)
     {
         WriteDataItem(writer, dataElement.Data as IDataItem);
     }
     else if (dataElement.Data is IDataSource)
     {
         IDataSource dataSource = dataElement.Data as IDataSource;
         writer.WriteLine(string.Format("Data source name: {0}", dataSource.Name.Value));
         writer.WriteLine(string.Format("Data source assembly: {0}", dataSource.Assembly));
         writer.WriteLine(string.Format("Data source class: {0}", dataSource.Class));
         writer.WriteLine(string.Format("Data source method: {0}", dataSource.Method.Name.Value));
         WriteParameters(writer, dataSource.Method.Parameters);
     }
     else if (dataElement.Data is IPolicyObjectCollection<IDataItem>)
     {
         foreach (IDataItem dataItem in (dataElement.Data as IPolicyObjectCollection<IDataItem>))
         {
             WriteDataItem(writer, dataItem);
         }
     }
     else
     {
         writer.WriteLine(dataElement.Data.ToString());
     }
 }
        private void WriteDataElementSimpleType(XmlNode xmlParentNode, IDataElement dataElement)
        {
            if (IsDataItem(dataElement) || IsDataSource (dataElement) || IsDataItemArray(dataElement) || IsDataSourceArray(dataElement))
                return;

            xmlParentNode.InnerText = Convert.ToString(dataElement.Data, CultureInfo.InvariantCulture);
        }
예제 #48
0
파일: TreeView.cs 프로젝트: gethernet/smm
        private bool CreateSubCopies(IDataElement iDataElement, string sRelativePath)
        {
            // traverse through childs first
            foreach (IDataElement itm in iDataElement.DataChilds)
            {
                string sPath = sRelativePath;
                if (itm.Name.Length > 0)
                {
                    sPath = sPath + "/" + itm.Name;
                }

                if (!CreateSubCopies(itm, sPath))
                {
                    return(false);
                }
            }

            // if working copy, create a copy for the links above
            if ((iDataElement is WorkingCopy) &&
                (sRelativePath.Length > 0))         ///< only applies if working copy of sub/external (not same as top project)
            {
                WorkingCopy wc = (WorkingCopy)iDataElement;

                if (null == wc.m_xInfo)
                {
                    wc.m_xInfo = SvnXmlInfo.GetInfo(wc.m_sPath);
                }

                string sURLVersionPath2,
                       sURLVersionBase = General.GetVersionBase(wc.m_xInfo.m_Entries[0].m_sURL, out sURLVersionPath2),
                       sURL            = sURLVersionBase + m_sURLVersionPath;

                if (sURLVersionBase.Length > 0)
                {
                    // check, if target path exists
                    SvnXmlInfo xTarget = SvnXmlInfo.GetInfo(sURL);
                    if ((xTarget == null) || (xTarget.m_Entries.Count == 0))
                    {
                        int iRet = svn.Copy(wc.m_sPath, sURL, "hierarchal copy " + m_sRootProject + sRelativePath + " as " + m_sURLVersionPath, true);
                        if (iRet != 0)
                        {
                            return(false);
                        }
                    }
                    else
                    {
                        if (!m_bIgnoreExistingTargets)
                        {
                            MainWindow wnd = (MainWindow)iDataElement.MainWnd;
                            switch (MessageBox.Show("Target URL\n" + sURL + "\nalready exists.\n\nContinue?\n\n(cancel = do not ask again)", "Target exists", MessageBoxButton.YesNoCancel))
                            {
                            case MessageBoxResult.No:
                                return(false);

                            case MessageBoxResult.Cancel:
                                m_bIgnoreExistingTargets = true;
                                break;
                            }
                        }
                    }
                }
            }

            // re-map version elements to project-specific copy
            if (iDataElement is External)
            {
                External ext = (External)iDataElement;
                if (ext.m_sURLVersionBase.Length > 0)
                {
                    ext.m_sURLVersionPathTemp = ext.m_sURLVersionPath;
                    ext.m_sURLVersionPath     = m_sURLVersionPath;

                    ext.m_sPegRevisionTemp = ext.m_sPegRevision;
                    ext.m_sPegRevision     = "";

                    ext.m_sOpRevisionTemp = ext.m_sOpRevision;
                    ext.m_sOpRevision     = "";

                    // update view
                    if (iDataElement.TreeItem != null)
                    {
                        MainWindow wnd = (MainWindow)m_iRootElement.MainWnd;
                        TreeItem   ti  = (TreeItem)iDataElement.TreeItem;
                        ti.VersionPath = ti.VersionPath;
                        ti.Revision    = ti.Revision;
                        wnd.RefreshTreeView();
                    }
                }
            }

            // apply changes of externals
            if (iDataElement is FolderWithExternals)
            {
                FolderWithExternals fld = (FolderWithExternals)iDataElement;
                fld.ApplyChanges(false, true, true);
            }

            return(true);
        }
예제 #49
0
 public DataBlock(IDataElement parent)
 {
     Children     = new List <IDataElement>();
     Parent       = parent;
     NestingLevel = parent?.NestingLevel + 1 ?? 0;
 }
예제 #50
0
        private void WriteDataElement(IDataElement element)
        {
            if (element.Data is IDataSource)
            {
                IDataSource datasource = element.Data as IDataSource;
                WriteDataSource(element, datasource);
            }
            else if (element.Data is IPolicyObjectCollection<IDataSource>)
            {
                IPolicyObjectCollection<IDataSource> datasources = element.Data as IPolicyObjectCollection<IDataSource>;
                foreach (IDataSource datasource in datasources)
                {
                    WriteDataSource(element, datasource);
                }
            }
            else
            {
                if (element.Data is IPolicyObjectCollection<IDataItem>)
                {
                    IPolicyObjectCollection<IDataItem> dataitems = element.Data as IPolicyObjectCollection<IDataItem>;
                    WriteDataItems(element, dataitems);
                }
                else
                {
                    foreach (NxPolicySet policyset in m_policysets.PolicySets)
                    {

                        IDataItem di = element.Data as IDataItem;
                        if (di != null)
                        {
                            policyset.Policies[policyset.Policies.Count - 1].Append(new NxPrimitive(element.Identifier.ToString(), element.Type, Convert.ToString(di.Value, CultureInfo.InvariantCulture)));
                        }
                        else
                        {
                            policyset.Policies[policyset.Policies.Count - 1].Append(new NxPrimitive(element.Identifier.ToString(), element.Type, Convert.ToString(element.Data, CultureInfo.InvariantCulture)));
                        }
                    }
                }
            }
        }
예제 #51
0
 public Parameter(string name, IDataElement value)
     : base(Guid.NewGuid(), new NonTranslateableLanguageItem(name))
 {
     m_value = value;
 }
예제 #52
0
 public NxDataElement(IDataElement de)
 {
     m_DataElement = de;
 }
예제 #53
0
        /// <summary>
        /// Invokes a dialog to allow the user to edit the action. If the user edits the action,
        /// the action data will be updated.
        /// </summary>
        /// <returns>The DialogResult of the edit dialog</returns>
        private DialogResult EditAction()
        {
            IResourceManager resourceManager = ResourcesCache.GetResources();
            if (!ActionAvailable(resourceManager, m_action))
                return DialogResult.Abort;

            m_transparentElem = InitDataElem(LanguageItemKeys.TRANSPARENT);

            m_autoExpandElem = InitDataElem(LanguageItemKeys.AUTOEXPAND);

            m_executeOptionElem = InitDataElem(LanguageItemKeys.ALWAYSEXECUTE);

            AddEditActionsForm frm = new AddEditActionsForm(resourceManager);
            frm.InitialAction = m_action;
            frm.OpenForEdit = true;
            frm.Channel = m_channel;
            frm.AllowTransparent = RoutingHelper.SupportTransparentProcessing(m_channel.Routing);
            frm.IsExceptionCell = m_isExceptionCell;

            if (m_transparentElem.Data is DataItem)
                frm.Transparent = (bool)((DataItem)m_transparentElem.Data).Value;

            //if (m_autoExpandElem.Data is DataItem)
            //    frm.AutoExpand = (bool)((DataItem)m_autoExpandElem.Data).Value;

            if (m_executeOptionElem.Data is DataItem)
            {
                PopulateExecutionOption(frm);
            }
            
            
            DialogResult result = DoShowForm(frm);
            if (result == DialogResult.OK)
            {
                m_action.Override = frm.Override;
                m_action.Name.Value = frm.MyName;
                m_action.RunAt = frm.RunAt;

                m_transparentElem.Data =
                    DataItem.CreateDataItem(new NonTranslateableLanguageItem(String.Empty), DataType.Boolean,
                                            frm.Transparent);

                ConnectExecutionOption(frm.ExecutionOption);          

                IDictionaryEnumerator propEnumerator = frm.ListItems.GetEnumerator();
                while (propEnumerator.MoveNext())
                {
                    ActionDataElement ade = (ActionDataElement)propEnumerator.Value;
                    IDataElement de = m_action.DataElements[ade.Identifier];

                    if (0 == string.Compare(de.DisplayName.Value, LanguageItemKeys.AUTOEXPAND, StringComparison.InvariantCultureIgnoreCase))
                        continue;

                    if (0 == string.Compare(de.DisplayName.Value, LanguageItemKeys.ALWAYSEXECUTE, StringComparison.InvariantCultureIgnoreCase))
                        continue;

                    if (ade.IsDataSource)
                    {
                        de.Data = ade.Value;
                    }
                    else
                    {
                        if (de.Type == DataType.StringArray)
                        {
                            de.Data = ConversionUtils.StringArrayToPolicyObjectModelStringArray((string[])ade.Value);
                        }
                        else
                        {
                            ((IDataItem)de.Data).Value = ade.Value;
                        }
                    }

                    de["allowoverride"].Value = ade.Override.ToString();
                    de["visible"].Value = ade.Visible.ToString();
                }

                propEnumerator = frm.FileItems.GetEnumerator();
                while (propEnumerator.MoveNext())
                {
                    ActionFiletype frmFtype = (ActionFiletype)propEnumerator.Value;

                    IActionFiletype ftype = m_action.Filetypes[frmFtype.Identifier];
                    if (ftype != null)
                    {
                        ftype.Apply = frmFtype.Apply;
                        ftype.Name.Value = frmFtype.Name.Value;
                        ftype.Type = frmFtype.Type;
                    }
                    else
                        m_action.Filetypes.Add(frmFtype);
                }
                StateMachine.ChildForm.IsModified = true;
            }

            return result;
        }
 private void WriteDataElementData(XmlNode xmlParentNode, IDataElement dataElement)
 {
     WriteDataElementSimpleType(xmlParentNode, dataElement);
     WriteDataElementDataItem(xmlParentNode, dataElement);
 }
예제 #55
0
        public void WriteDataElement(IDataElement dataElement)
        {
            if (null == dataElement)
                return;

            CollectionInserter<IDataElement>.Insert(m_dataElements, dataElement);
        }
예제 #56
0
        /*
         * This method executes a utility network trace to find all the low voltage service points
         * serviced by the specified transformer and returns the service points global IDs
         */
        private IStringArray FindLVServicePoints(string xfrGlobalID)
        {
            //Get required Utility Network interfaces
            IBaseNetwork      unBaseNetwork    = (IBaseNetwork)unDataset;
            IDatasetComponent datasetComponent = (IDatasetComponent)unDataset;
            IDEDataset        deDataset        = datasetComponent.DataElement;
            IDEBaseNetwork    deBaseNetwork    = (IDEBaseNetwork)deDataset;
            IDEUtilityNetwork deUtilityNetwork = (IDEUtilityNetwork)deBaseNetwork;
            IDataElement      deElement        = (IDataElement)deDataset;

            //Create and initialize network tracer
            IUtilityNetworkQuery unQry = unBaseNetwork.CreateQuery();
            ITracer unTracer           = unBaseNetwork.CreateTracer();

            unTracer.Initialize(unQry, (IDataElement)deDataset);

            // Add transformer as trace starting point
            IStringArray startGUID = new StrArrayClass();

            startGUID.Add(xfrGlobalID);
            ILongArray startTerm = new LongArrayClass();

            startTerm.Add(MV_XFR_TERMINAL_ID);

            unTracer.AddTraceLocationForJunctionFeatures(esriTraceLocationType.esriTLTStartingPoint, startGUID, startTerm);

            // Configure trace parameters
            UNTraceConfiguration traceConfig = new UNTraceConfiguration();

            traceConfig.IgnoreBarriersAtStartingPoints = true;
            traceConfig.IncludeContainers = false;
            traceConfig.IncludeBarriers   = false;
            traceConfig.IncludeContent    = true;
            traceConfig.IncludeIsolated   = false;
            traceConfig.IncludeStructures = false;
            traceConfig.IncludeUpToFirstSpatialContainer = false;
            traceConfig.DomainNetworkName   = DOMAIN_NETWORK;
            traceConfig.TierName            = MV_TIER_NAME;
            traceConfig.TargetTierName      = MV_TIER_NAME;
            traceConfig.TraversabilityScope = esriTraversabilityScope.esriTSJunctionsAndEdges;
            traceConfig.FilterScope         = esriTraversabilityScope.esriTSJunctionsAndEdges;
            traceConfig.ValidateConsistency = false;

            // Add output filter to only return service points
            IArray outFilters = new ArrayClass();

            for (int i = 0; i < LV_SERVICE_ASSETTYPES.Length; i++)
            {
                UNOutputFilter outFilter = new UNOutputFilter();
                outFilter.NetworkSourceID = DEVICE_SOURCE_ID;
                outFilter.AssetGroupCode  = LV_SERVICE_ASSETGROUP;
                outFilter.AssetTypeCode   = LV_SERVICE_ASSETTYPES[i];
                outFilters.Add(outFilter);
            }
            traceConfig.OutputFilters = outFilters;

            unTracer.TraceConfiguration = (ITraceConfiguration)traceConfig;

            // Execute the trace
            long[] jEid = new long[1];
            long[] eEid = new long[1];

            unTracer.Trace(esriUtilityNetworkTraceType.esriUNTTDownstream, out jEid, out eEid);

            // Get features from returned elements
            IUNTraceResults unTraceResults = (IUNTraceResults)unTracer;

            ILongArray   junctionNetworkSourceIDs = new LongArrayClass();
            IStringArray junctionGlobalIDs        = new StrArrayClass();
            ILongArray   junctionObjectIDs        = new LongArrayClass();
            ILongArray   junctionTerminalIDs      = new LongArrayClass();
            ILongArray   junctionAssetGroupCodes  = new LongArrayClass();
            ILongArray   junctionAssetTypeCodes   = new LongArrayClass();
            ILongArray   edgeNetworkSourceIDs     = new LongArrayClass();
            IStringArray edgeGlobalIDs            = new StrArrayClass();
            ILongArray   edgeObjectIDs            = new LongArrayClass();
            ILongArray   edgeAssetGroupCodes      = new LongArrayClass();
            ILongArray   edgeAssetTypeCodes       = new LongArrayClass();

            unTraceResults.TraceResultFeatures(out junctionNetworkSourceIDs, out junctionGlobalIDs, out junctionObjectIDs, out junctionTerminalIDs, out junctionAssetGroupCodes, out junctionAssetTypeCodes, out edgeNetworkSourceIDs, out edgeGlobalIDs, out edgeObjectIDs, out edgeAssetGroupCodes, out edgeAssetTypeCodes);

            return(junctionGlobalIDs);
        }
 private bool IsDataItem(IDataElement dataElement)
 {
     DataItem dataItem = dataElement.Data as DataItem;
     return (dataItem != null);
 }
예제 #58
0
파일: BitMap.cs 프로젝트: edercnj/ISONET
 public BitMap(bool[] firstBitMap, bool[] secondBitMap, IDataElement[] dataElements)
 {
     FirstBitMap = firstBitMap;
     SecondBitMap = secondBitMap;
     DataElements = dataElements;
 }
 private bool IsDataSource(IDataElement dataElement)
 {
     DataSource dataSource = dataElement.Data as DataSource;
     return (dataSource != null);
 }