Exemplo n.º 1
0
        public override RawDataSourceInfoBase Clone()
        {
            RawDataSourceInfo rawDataSourceInfo = new RawDataSourceInfo(this.sourceNode, this.clrPath);

            rawDataSourceInfo.XmlPath = this.XmlPath;
            return((RawDataSourceInfoBase)rawDataSourceInfo);
        }
Exemplo n.º 2
0
        public override RawDataSourceInfoBase CombineWith(RawDataSourceInfoBase localSource)
        {
            if (localSource == null)
            {
                return((RawDataSourceInfoBase)this);
            }
            if (!this.IsValid || !localSource.IsValid || (localSource.SourceNode != null || localSource is ElementDataSourceInfo))
            {
                return(localSource);
            }
            RawDataSourceInfo rawDataSourceInfo = (RawDataSourceInfo)localSource;

            if (rawDataSourceInfo.IsEmpty)
            {
                return((RawDataSourceInfoBase)this);
            }
            ElementDataSourceInfo elementDataSourceInfo = (ElementDataSourceInfo)this.Clone();

            elementDataSourceInfo.AppendClrPath(rawDataSourceInfo.ClrPath);
            elementDataSourceInfo.XmlPath = localSource.XmlPath;
            return((RawDataSourceInfoBase)elementDataSourceInfo);
        }
Exemplo n.º 3
0
        public override RawDataSourceInfoBase CombineWith(RawDataSourceInfoBase localSource)
        {
            if (localSource == null)
            {
                return((RawDataSourceInfoBase)this);
            }
            if (!localSource.IsValid || localSource.SourceNode != null)
            {
                return(localSource);
            }
            if (!this.IsValid)
            {
                return((RawDataSourceInfoBase)this);
            }
            RawDataSourceInfo rawDataSourceInfo1 = localSource as RawDataSourceInfo;
            RawDataSourceInfo rawDataSourceInfo2 = new RawDataSourceInfo(this.SourceNode, ClrPropertyPathHelper.CombinePaths(this.ClrPath, rawDataSourceInfo1.ClrPath));

            rawDataSourceInfo2.XmlPath = XmlSchema.CombineXPaths(this.XmlPath, rawDataSourceInfo1.XmlPath);
            for (int index = 0; index < rawDataSourceInfo1.pendingIndexSteps; ++index)
            {
                rawDataSourceInfo2.AppendIndexStep();
            }
            return((RawDataSourceInfoBase)rawDataSourceInfo2);
        }