本文整理汇总了C#中IProjection类的典型用法代码示例。如果您正苦于以下问题:C# IProjection类的具体用法?C# IProjection怎么用?C# IProjection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IProjection类属于命名空间,在下文中一共展示了IProjection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetProjectionArgument
private static SqlString GetProjectionArgument(ICriteriaQuery criteriaQuery, ICriteria criteria,
IProjection projection, int loc,
IDictionary<string, IFilter> enabledFilters)
{
SqlString sql = projection.ToSqlString(criteria, loc, criteriaQuery, enabledFilters);
return sql.Substring(0, sql.LastIndexOfCaseInsensitive(" as "));
}
开发者ID:pvginkel,项目名称:NHibernate.OData,代码行数:7,代码来源:OperatorProjection.cs
示例2: StyleOsmStreamSceneTarget
/// <summary>
/// Creates a new MapCSS scene target.
/// </summary>
/// <param name="mapCSSInterpreter"></param>
/// <param name="scene"></param>
/// <param name="projection"></param>
public StyleOsmStreamSceneTarget(StyleInterpreter mapCSSInterpreter,
Scene2D scene, IProjection projection)
{
_projection = projection;
_scene = scene;
_mapCSSInterpreter = mapCSSInterpreter;
}
开发者ID:vcotlearov,项目名称:OsmSharp,代码行数:13,代码来源:StyleOsmStreamSceneTarget.cs
示例3: LayerGpx
/// <summary>
/// Creates a new OSM data layer.
/// </summary>
/// <param name="projection"></param>
public LayerGpx(IProjection projection)
{
_projection = projection;
this.Scene = new Scene2DSimple();
this.Scene.BackColor = SimpleColor.FromKnownColor(KnownColor.Transparent).Value;
}
开发者ID:robert-hickey,项目名称:OsmSharp,代码行数:11,代码来源:LayerGpx.cs
示例4: CreateCoordinateOperation
public static IMathTransform CreateCoordinateOperation(IProjection projection, IEllipsoid ellipsoid)
{
ParameterList parameterList = new ParameterList();
for(int i=0; i< projection.NumParameters; i++)
{
ProjectionParameter param = projection.GetParameter(i);
parameterList.Add(param.Name,param.Value);
}
parameterList.Add("semi_major",ellipsoid.SemiMajorAxis);
parameterList.Add("semi_minor",ellipsoid.SemiMinorAxis);
IMathTransform transform = null;
switch(projection.Name.ToLower())
{
case "mercator":
//1SP
transform = new MercatorProjection(parameterList);
break;
case "transverse_mercator":
transform = new TransverseMercatorProjection(parameterList);
break;
case "albers":
transform = new AlbersProjection(parameterList);
break;
case "lambert":
transform = new LambertConformalConic2SPProjection(parameterList);
break;
default:
throw new NotSupportedException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "Projection {0} is not supported.",projection.AuthorityCode));
}
return transform;
}
开发者ID:vmoll,项目名称:geotools,代码行数:32,代码来源:CoordinateTransformationFactory.cs
示例5: IsVersionExist
public bool IsVersionExist(IProjection projection)
{
using (var con = db.OpenDbConnection())
{
return con.Count<ProjectionVersionDto>(x => x.ProjectionName == GetName(projection)) > 0;
}
}
开发者ID:mojamcpds,项目名称:NEventStore.Cqrs,代码行数:7,代码来源:VersioningRepository.cs
示例6: CreateCoordinateOperation
private static IMathTransform CreateCoordinateOperation(IProjection projection, IEllipsoid ellipsoid)
{
List<ProjectionParameter> parameterList = new List<ProjectionParameter>(projection.NumParameters);
for (int i = 0; i < projection.NumParameters; i++)
parameterList.Add(projection.GetParameter(i));
parameterList.Add(new ProjectionParameter("semi_major", ellipsoid.SemiMajorAxis));
parameterList.Add(new ProjectionParameter("semi_minor", ellipsoid.SemiMinorAxis));
IMathTransform transform = null;
switch (projection.ClassName.ToLower())
{
case "mercator_1sp":
case "mercator_2sp":
//1SP
transform = new Mercator(parameterList);
break;
case "transverse_mercator":
transform = new TransverseMercator(parameterList);
break;
case "albers":
transform = new AlbersProjection(parameterList);
break;
case "lambert_conformal_conic":
case "lambert_conformal_conic_2sp":
transform = new LambertConformalConic2SP(parameterList);
break;
default:
throw new NotSupportedException(String.Format("Projection {0} is not supported.", projection.ClassName));
}
return transform;
}
开发者ID:jumpinjackie,项目名称:fdotoolbox,代码行数:32,代码来源:CoordinateTransformationFactory.cs
示例7: Projection
public Projection(ISpatialReference pSpatialReference, IWorkspace pWorkSpace)
{
IProjectedCoordinateSystem pProjectedCoordinateSys = pSpatialReference as IProjectedCoordinateSystem;
m_pSpatialReference = pSpatialReference;
m_pIProjection = pProjectedCoordinateSys.Projection;
m_pWorkspace = pWorkSpace;
}
开发者ID:hy1314200,项目名称:HyDM,代码行数:7,代码来源:Projection.cs
示例8: OrderBy
public OrderBy(IProjection projection, OrderByDirection direction)
{
Require.NotNull(projection, "projection");
Direction = direction;
Projection = projection;
}
开发者ID:justintoth,项目名称:NHibernate.OData,代码行数:7,代码来源:OrderBy.cs
示例9: GetProjectionArgument
private static SqlString GetProjectionArgument(ICriteriaQuery criteriaQuery, ICriteria criteria,
IProjection projection, int loc,
IDictionary<string, IFilter> enabledFilters)
{
SqlString sql = projection.ToSqlString(criteria, loc, criteriaQuery, enabledFilters);
return StringHelper.RemoveAsAliasesFromSql(sql);
}
开发者ID:justintoth,项目名称:NHibernate.OData,代码行数:7,代码来源:OperatorProjection.cs
示例10: ProjectionWrapper
public ProjectionWrapper(IProjection projection, ILogger log)
{
this.projection = projection;
this.buferredProjection = projection as IBuferredProjection;
this.log = log;
Init();
}
开发者ID:mojamcpds,项目名称:NEventStore.Cqrs,代码行数:7,代码来源:ProjectionWrapper.cs
示例11: GetFilterModifierCriterion
/// <summary>
/// Gets the filter modifier criterion.
/// </summary>
/// <param name="projection">The projection.</param>
/// <param name="filerModifier">The filer modifier.</param>
/// <param name="value">The value.</param>
/// <returns>A <see cref="NHibernate.Criterion.ICriterion"/></returns>
public static ICriterion GetFilterModifierCriterion( IProjection projection, string filerModifier, object value )
{
ICriterion ret = null;
if ( filerModifier == FilterModifier.EqualTo )
{
ret = Restrictions.Eq ( projection, value );
}
else if ( filerModifier == FilterModifier.GreaterThan )
{
ret = ( Restrictions.Gt ( projection, value ) );
}
else if ( filerModifier == FilterModifier.GreaterThanOrEqualTo )
{
ret = ( Restrictions.Ge ( projection, value ) );
}
else if ( filerModifier == FilterModifier.LessThen )
{
ret = ( Restrictions.Lt ( projection, value ) );
}
else if ( filerModifier == FilterModifier.LessThenOrEqualTo )
{
ret = ( Restrictions.Le ( projection, value ) );
}
else
{
throw new ArgumentException ( "Invalid Filter Modifier" );
}
return ret;
}
开发者ID:divyang4481,项目名称:REM,代码行数:36,代码来源:PatientListHelper.cs
示例12: GetModifiedReason
public string GetModifiedReason(IProjection projection)
{
if (projection == null || projection is ICheckpointStore)
{
return string.Empty;
}
try
{
var dto = collection.AsQueryable().FirstOrDefault(x => x.ProjectionName == GetName(projection));
if (dto == null)
{
return "Version is absent";
}
if (dto.Version != projection.Version)
{
return "Version is different";
}
if (dto.Hash != StructureHash.CalculateMD5(projection))
{
return "Hash is different";
}
return string.Empty;
}
catch (Exception ex)
{
if (ex is SqlException || ex.Message.Contains("Invalid column name"))
{
return "Invalid column name";
}
throw;
}
}
开发者ID:mojamcpds,项目名称:NEventStore.Cqrs,代码行数:34,代码来源:VersioningRepository.cs
示例13: AddProjection
/**
* Adds the given projection.
*
* @param projection the projection to add
* @return this
*/
public IExitOperationsCollector AddProjection(IProjection projection)
{
if (projection.GetType().IsAssignableFrom(distinct.GetType()))
{
this.distinct = (Distinct) projection;
//TODO: Distinct doesn't work yet
log.Error("Distinct is not ready yet");
throw new NotSupportedException();
}
if (projection.GetType().IsAssignableFrom(rowCountProjection.GetType()))
{
rowCountProjection = (RowCountProjection) projection;
}
if (projection.GetType().IsAssignableFrom(aggregateProjection.GetType()))
{
if (projection.ToString().ToLower().StartsWith("avg"))
{
this.avgProjection = (AggregateProjection)projection;
}
else
{
this.aggregateProjection = (AggregateProjection)projection;
}
}
else
{
log.Error("Adding an unsupported Projection: " + projection.GetType().Name);
throw new NotSupportedException();
}
return this;
}
开发者ID:hazzik,项目名称:nhcontrib-all,代码行数:38,代码来源:ExitOperationsCriteriaCollector.cs
示例14: ProjectedCoordinateSystem
/// <summary>
/// Initializes a new instance of the ProjectedCoordinateSystem class.
/// </summary>
/// <param name="horizontalDatum">The horizontal datum to use.</param>
/// <param name="axisInfoArray">An array of IAxisInfo representing the axis information.</param>
/// <param name="geographicCoordSystem">The geographic coordinate system.</param>
/// <param name="linearUnit">The linear units to use.</param>
/// <param name="projection">The projection to use.</param>
/// <param name="remarks">Remarks about this object.</param>
/// <param name="authority">The name of the authority.</param>
/// <param name="authorityCode">The code the authority uses to identidy this object.</param>
/// <param name="name">The name of the object.</param>
/// <param name="alias">The alias of the object.</param>
/// <param name="abbreviation">The abbreviated name of this object.</param>
internal ProjectedCoordinateSystem(
IHorizontalDatum horizontalDatum,
IAxisInfo[] axisInfoArray,
IGeographicCoordinateSystem geographicCoordSystem,
ILinearUnit linearUnit,
IProjection projection,
string remarks, string authority, string authorityCode, string name, string alias, string abbreviation)
: base(remarks, authority, authorityCode, name, alias, abbreviation)
{
if (axisInfoArray==null)
{
throw new ArgumentNullException("axisInfoArray");
}
if (geographicCoordSystem==null)
{
throw new ArgumentNullException("geographicCoordSystem");
}
if (projection==null)
{
throw new ArgumentNullException("projection");
}
if (linearUnit==null)
{
throw new ArgumentNullException("linearUnit");
}
_horizontalDatum=horizontalDatum;
_axisInfoArray= axisInfoArray;
_geographicCoordSystem = geographicCoordSystem;
_projection= projection;
_linearUnit = linearUnit;
}
开发者ID:vmoll,项目名称:geotools,代码行数:45,代码来源:ProjectedCoordinateSystem.cs
示例15: QuadKeyToRect
public static Rectangle QuadKeyToRect(IProjection projection, QuadKey quadKey)
{
var boundingBox = QuadKeyToBoundingBox(quadKey);
var minPoint = projection.Project(boundingBox.MinPoint, 0);
var maxPoint = projection.Project(boundingBox.MaxPoint, 0);
return new Rectangle(minPoint.x, minPoint.z, maxPoint.x - minPoint.x, maxPoint.z - minPoint.z);
}
开发者ID:RagnarDanneskjold,项目名称:utymap,代码行数:8,代码来源:GeoUtils.cs
示例16: StyleOsmStreamSceneStreamTarget
/// <summary>
/// Creates a new MapCSS scene target.
/// </summary>
/// <param name="styleInterpreter"></param>
/// <param name="scene"></param>
/// <param name="projection"></param>
/// <param name="stream"></param>
public StyleOsmStreamSceneStreamTarget(StyleInterpreter styleInterpreter,
Scene2D scene, IProjection projection, Stream stream)
{
_projection = projection;
_scene = scene;
_styleInterpreter = styleInterpreter;
_stream = stream;
}
开发者ID:JoeCooper,项目名称:ui,代码行数:15,代码来源:StyleOsmStreamSceneStreamTarget.cs
示例17: Tile
/// <summary> Creates <see cref="Tile"/>. </summary>
/// <param name="quadKey"></param>
/// <param name="stylesheet"></param>
/// <param name="projection"> Projection. </param>
internal Tile(QuadKey quadKey, Stylesheet stylesheet, IProjection projection)
{
QuadKey = quadKey;
Stylesheet = stylesheet;
Projection = projection;
BoundingBox = GeoUtils.QuadKeyToBoundingBox(quadKey);
Rectangle = GeoUtils.QuadKeyToRect(projection, quadKey);
}
开发者ID:RagnarDanneskjold,项目名称:utymap,代码行数:13,代码来源:Tile.cs
示例18: Setup
public void Setup()
{
_compositionRoot = TestHelper.GetCompositionRoot(TestHelper.WorldZeroPoint,
(container, _) => container.Register(Component.For<IElevationProvider>().Use<FlatElevationProvider>()));
_elementEditor = _compositionRoot.GetService<IElementEditor>();
_dataLoader = _compositionRoot.GetService<IMapDataLoader>();
_stylesheet = _compositionRoot.GetService<Stylesheet>();
_projection = _compositionRoot.GetService<IProjection>();
}
开发者ID:RagnarDanneskjold,项目名称:utymap,代码行数:9,代码来源:ElementEditorTests.cs
示例19: EqIncludeNullExpression
/// <summary>
/// 생성자
/// </summary>
/// <param name="projection"></param>
/// <param name="value"></param>
public EqIncludeNullExpression(IProjection projection, object value) {
_projection = projection;
if(value != null)
_criterion = Restrictions.Disjunction()
.Add(Restrictions.Eq(projection, value))
.Add(Restrictions.IsNull(projection));
else
_criterion = Restrictions.IsNull(projection);
}
开发者ID:debop,项目名称:NFramework,代码行数:15,代码来源:EqIncludeNullExpression.cs
示例20: AggregateExitOperation
public AggregateExitOperation(IProjection projection)
{
string projectionAsString = projection.ToString();
int start = projectionAsString.IndexOf("(");
string aggregateName = projectionAsString.Substring(0, start);
start++;
int stop = projectionAsString.IndexOf(")");
_fieldName = projectionAsString.Substring(start, stop - start);
_aggregate = (SupportedAggregations) Enum.Parse(_aggregate.GetType(), aggregateName.ToUpper());
}
开发者ID:spib,项目名称:nhcontrib,代码行数:10,代码来源:AggregateExitOperation.cs
注:本文中的IProjection类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论